diff --git a/cmd/root.go b/cmd/root.go index e10254c6..05e18734 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -64,7 +64,7 @@ func initConfig() { if cfgFile == "" { home, err := homedir.Dir() if err != nil { - color.Red(err) + color.Red("Failed to get home dir: %s", err) os.Exit(1) } viper.AddConfigPath(home) diff --git a/pkg/api/apisix/types/types.go b/pkg/api/apisix/types/types.go index 8e73534d..36245a04 100644 --- a/pkg/api/apisix/types/types.go +++ b/pkg/api/apisix/types/types.go @@ -49,7 +49,7 @@ type Route struct { EnableWebsocket bool `json:"enable_websocket,omitempty" yaml:"enable_websocket,omitempty"` RemoteAddr string `json:"remote_addr,omitempty" yaml:"remote_addr,omitempty"` RemoteAddrs []string `json:"remote_addrs,omitempty" yaml:"remote_addrs,omitempty"` - Upstream *Upstream `json:"upstream,omitempty" yaml:"upstream,omitempty"` + Upstream *Upstream `json:"upstream,omitempty" yaml:"upstream,omitempty"` UpstreamID string `json:"upstream_id,omitempty" yaml:"upstream_id,omitempty"` ServiceID string `json:"service_id,omitempty" yaml:"service_id,omitempty"` Plugins Plugins `json:"plugins,omitempty" yaml:"plugins,omitempty"`