From a7e5dc57988739ff1e78dde1a6bb2c1356951893 Mon Sep 17 00:00:00 2001 From: Romain Bertrand Date: Wed, 28 Jan 2026 14:29:59 +0100 Subject: [PATCH] lint: find a bunch of issues --- cmd/actions.go | 12 ++++++------ cmd/repo.go | 2 +- cmd/root.go | 2 +- internal/config/config.go | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/actions.go b/cmd/actions.go index f9d4685..3f54ea0 100644 --- a/cmd/actions.go +++ b/cmd/actions.go @@ -1052,9 +1052,9 @@ func runWorkflowEnable(cmd *cobra.Command, args []string) error { if err != nil { if status == http.StatusNotFound && strings.Contains(err.Error(), "404") { - return fmt.Errorf("failed to enable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+\n" + - "Your instance does not support the workflow enable/disable API endpoints yet.\n" + - "You can enable workflows via the web UI instead.") + return fmt.Errorf("failed to enable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+. " + + "Your instance does not support the workflow enable/disable API endpoints yet. " + + "You can enable workflows via the web UI instead") } return fmt.Errorf("failed to enable workflow: %w", err) } @@ -1097,9 +1097,9 @@ func runWorkflowDisable(cmd *cobra.Command, args []string) error { if err != nil { if status == http.StatusNotFound && strings.Contains(err.Error(), "404") { - return fmt.Errorf("failed to disable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+\n" + - "Your instance does not support the workflow enable/disable API endpoints yet.\n" + - "You can disable workflows via the web UI instead.") + return fmt.Errorf("failed to disable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+. " + + "Your instance does not support the workflow enable/disable API endpoints yet. " + + "You can disable workflows via the web UI instead") } return fmt.Errorf("failed to disable workflow: %w", err) } diff --git a/cmd/repo.go b/cmd/repo.go index 3264196..286efc7 100644 --- a/cmd/repo.go +++ b/cmd/repo.go @@ -8,9 +8,9 @@ import ( "text/tabwriter" "code.gitea.io/sdk/gitea" - "github.com/spf13/cobra" "codeberg.org/romaintb/fgj/internal/api" "codeberg.org/romaintb/fgj/internal/config" + "github.com/spf13/cobra" ) var repoCmd = &cobra.Command{ diff --git a/cmd/root.go b/cmd/root.go index c1a373b..6f5afa4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,9 +5,9 @@ import ( "os" "strings" + "codeberg.org/romaintb/fgj/internal/git" "github.com/spf13/cobra" "github.com/spf13/viper" - "codeberg.org/romaintb/fgj/internal/git" ) var cfgFile string diff --git a/internal/config/config.go b/internal/config/config.go index 9584efc..4a5dc23 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -14,9 +14,9 @@ type Config struct { } type HostConfig struct { - Hostname string `yaml:"hostname"` - Token string `yaml:"token"` - User string `yaml:"user,omitempty"` + Hostname string `yaml:"hostname"` + Token string `yaml:"token"` + User string `yaml:"user,omitempty"` GitProtocol string `yaml:"git_protocol,omitempty"` }