add method to handlers
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Gitea Actions Demo / build-and-test (push) Failing after 29m54s

This commit is contained in:
Thomas Peetz
2026-10-26 22:41:15 +01:00
parent 9ab4f2103f
commit 72c08f9731
11 changed files with 198 additions and 52 deletions
+18 -17
View File
@@ -10,14 +10,25 @@ import (
"github.com/spf13/viper"
)
type MediaType string
var (
CfgFile string
Verbose int
Overwrite bool
ServerName string
Mediatype MediaType
Config CliConfig
DryRun bool
FileName string
)
const (
mediaTypeMedia MediaType = "media"
mediaTypeVideo MediaType = "video"
mediaTypeLofi MediaType = "lofi"
mediaTypeLofi MediaType = "lofi"
)
type MediaType string
func (e *MediaType) String() string {
return string(*e)
}
@@ -37,23 +48,13 @@ func (e *MediaType) Type() string {
}
func myEnumCompletion(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return []string{
"media\thelp text for media",
"video\thelp text for video",
"lofi\thelp text for lofi",
}, cobra.ShellCompDirectiveDefault
return []string{
"media\thelp text for media",
"video\thelp text for video",
"lofi\thelp text for lofi",
}, cobra.ShellCompDirectiveDefault
}
var (
CfgFile string
Verbose int
Overwrite bool
ServerName string
Mediatype MediaType
Config CliConfig
DryRun bool
)
type Server struct {
Url string `mapstructure:"url"`
Username string `mapstructure:"username"`