chore: make go-lint happy (#405)

Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
This commit is contained in:
Peter Pan
2023-05-12 19:24:30 +08:00
committed by GitHub
parent 50916f2c93
commit ed73485d92
10 changed files with 17 additions and 16 deletions

View File

@@ -35,7 +35,7 @@ var AuthCmd = &cobra.Command{
Long: `Provide the necessary credentials to authenticate with your chosen backend.`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
cmd.Help()
_ = cmd.Help()
return
}
},

View File

@@ -33,8 +33,8 @@ var newCmd = &cobra.Command{
PreRun: func(cmd *cobra.Command, args []string) {
backend, _ := cmd.Flags().GetString("backend")
if strings.ToLower(backend) == "azureopenai" {
cmd.MarkFlagRequired("engine")
cmd.MarkFlagRequired("baseurl")
_ = cmd.MarkFlagRequired("engine")
_ = cmd.MarkFlagRequired("baseurl")
}
},
Run: func(cmd *cobra.Command, args []string) {