Skip to content

Commit

Permalink
fix lint error again
Browse files Browse the repository at this point in the history
  • Loading branch information
robertchoi80 committed Nov 30, 2022
1 parent 8a752dc commit 0752f2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/appserve_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/spf13/viper"
"gopkg.in/yaml.v2"
"io"
"io/ioutil"
"os"
"net/http"
)

Expand Down Expand Up @@ -68,20 +68,20 @@ tks appserve create --appserve-config CONFIGFILE`,

var c conf
if appserveCfgFile == "" {
return fmt.Errorf("--appservce-config is mandatory param.")
return errors.New("--appservce-config is mandatory param.")
}

// Get Appserving request params from config file
yamlData, err := ioutil.ReadFile(appserveCfgFile)
yamlData, err := os.ReadFile(appserveCfgFile)
if err != nil {
fmt.Errorf("error: %s", err)
return fmt.Errorf("error: %s", err)
}

fmt.Printf("*******\nConfig:\n%+s\n*******\n", yamlData)

err = yaml.Unmarshal(yamlData, &c)
if err != nil {
fmt.Errorf("error: %s", err)
return fmt.Errorf("error: %s", err)
}

// Convert map to Json
Expand Down

0 comments on commit 0752f2b

Please sign in to comment.