lint: find a bunch of issues

This commit is contained in:
Romain Bertrand 2026-01-28 14:29:59 +01:00
parent 4c6de3ad2e
commit a7e5dc5798
4 changed files with 11 additions and 11 deletions

View file

@ -1052,9 +1052,9 @@ func runWorkflowEnable(cmd *cobra.Command, args []string) error {
if err != nil { if err != nil {
if status == http.StatusNotFound && strings.Contains(err.Error(), "404") { 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" + 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.\n" + "Your instance does not support the workflow enable/disable API endpoints yet. " +
"You can enable workflows via the web UI instead.") "You can enable workflows via the web UI instead")
} }
return fmt.Errorf("failed to enable workflow: %w", err) 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 err != nil {
if status == http.StatusNotFound && strings.Contains(err.Error(), "404") { 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" + 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.\n" + "Your instance does not support the workflow enable/disable API endpoints yet. " +
"You can disable workflows via the web UI instead.") "You can disable workflows via the web UI instead")
} }
return fmt.Errorf("failed to disable workflow: %w", err) return fmt.Errorf("failed to disable workflow: %w", err)
} }

View file

@ -8,9 +8,9 @@ import (
"text/tabwriter" "text/tabwriter"
"code.gitea.io/sdk/gitea" "code.gitea.io/sdk/gitea"
"github.com/spf13/cobra"
"codeberg.org/romaintb/fgj/internal/api" "codeberg.org/romaintb/fgj/internal/api"
"codeberg.org/romaintb/fgj/internal/config" "codeberg.org/romaintb/fgj/internal/config"
"github.com/spf13/cobra"
) )
var repoCmd = &cobra.Command{ var repoCmd = &cobra.Command{

View file

@ -5,9 +5,9 @@ import (
"os" "os"
"strings" "strings"
"codeberg.org/romaintb/fgj/internal/git"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
"codeberg.org/romaintb/fgj/internal/git"
) )
var cfgFile string var cfgFile string