fixes for nit-picky golang 1.24 toolchain

This commit is contained in:
Michael Quigley 2025-05-01 15:00:39 -04:00
parent 2dcb781394
commit ed0650a4bf
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
12 changed files with 15 additions and 13 deletions

View File

@ -6,6 +6,8 @@ REMOVED: The `websocket`-based OpenZiti metrics source has been removed. The pre
CHANGE: `github.com/openziti/sdk-golang` has been updated to `v1.1.0`. Related dependencies and indirects also updated
CHANGE: Updated to `golang` `v1.24` as the official build toolchain
## v1.0.3
FEATURE: `zrok agent console` now outputs the URL it is attempting to open. New `zrok agent console --headless` option to only emit the agent console URL (https://github.com/openziti/zrok/issues/944)

View File

@ -41,7 +41,7 @@ func (cmd *accessPublicCommand) run(_ *cobra.Command, args []string) {
panic(err)
}
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(cfg, cf.DefaultOptions()))
frontend, err := publicProxy.NewHTTP(cfg)
if err != nil {
if !panicInstead {

View File

@ -33,5 +33,5 @@ func (cmd *accessPublicValidateCommand) run(_ *cobra.Command, args []string) {
if err := cfg.Load(args[0]); err != nil {
tui.Error(fmt.Sprintf("unable to load configuration '%v'", args[0]), err)
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(cfg, cf.DefaultOptions()))
}

View File

@ -35,7 +35,7 @@ func (cmd *adminBootstrap) run(_ *cobra.Command, args []string) {
if err != nil {
panic(err)
}
logrus.Infof(cf.Dump(inCfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(inCfg, cf.DefaultOptions()))
if err := controller.Bootstrap(cmd.skipFrontend, inCfg); err != nil {
panic(err)
}

View File

@ -32,7 +32,7 @@ func (gc *adminGcCommand) run(_ *cobra.Command, args []string) {
if err != nil {
panic(err)
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(cfg, cf.DefaultOptions()))
if err := controller.GC(cfg); err != nil {
panic(err)
}

View File

@ -32,9 +32,9 @@ func (cmd *adminUnbootstrap) run(_ *cobra.Command, args []string) {
if err != nil {
panic(err)
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(cfg, cf.DefaultOptions()))
if err := controller.Unbootstrap(cfg); err != nil {
panic(err)
}
logrus.Infof("unbootstrap complete!")
logrus.Info("unbootstrap complete!")
}

View File

@ -42,7 +42,7 @@ func (cmd *controllerCommand) run(_ *cobra.Command, args []string) {
if err != nil {
panic(err)
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(cfg, cf.DefaultOptions()))
if err := controller.Run(cfg); err != nil {
panic(err)
}

View File

@ -37,7 +37,7 @@ func (cmd *bridgeCommand) run(_ *cobra.Command, args []string) {
if err != nil {
panic(err)
}
logrus.Infof(cf.Dump(cfg, env.GetCfOptions()))
logrus.Info(cf.Dump(cfg, env.GetCfOptions()))
bridge, err := metrics.NewBridge(cfg.Bridge)
if err != nil {

View File

@ -32,5 +32,5 @@ func (cmd *controllerValidateCommand) run(_ *cobra.Command, args []string) {
if err != nil {
tui.Error("controller config validation failed", err)
}
logrus.Infof(cf.Dump(cfg, cf.DefaultOptions()))
logrus.Info(cf.Dump(cfg, cf.DefaultOptions()))
}

View File

@ -87,7 +87,7 @@ func (cmd *inviteCommand) run(_ *cobra.Command, _ []string) {
}
fmt.Printf("invitation sent to '%v'!\n\n", email)
fmt.Printf(fmt.Sprintf("%v\n\n", tui.Attention.Render("*** be sure to check your SPAM folder if you do not receive the invitation email!")))
fmt.Println(fmt.Sprintf("%v\n", tui.Attention.Render("*** be sure to check your SPAM folder if you do not receive the invitation email!")))
}
}

View File

@ -43,7 +43,7 @@ func (cmd *statusCommand) run(_ *cobra.Command, _ []string) {
tui.Warning(fmt.Sprintf("Your environment is out of date ('%v'), use '%v' to update (make a backup before updating!)\n", env.Metadata().V, tui.Code.Render("zrok update")))
}
_, _ = fmt.Fprintf(os.Stdout, tui.Code.Render("Config")+":\n\n")
_, _ = fmt.Fprintln(os.Stdout, tui.Code.Render("Config")+":\n")
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)
t.SetStyle(table.StyleColoredDark)
@ -60,7 +60,7 @@ func (cmd *statusCommand) run(_ *cobra.Command, _ []string) {
if !env.IsEnabled() {
_, _ = fmt.Fprintf(os.Stderr, "To create a local environment use the %v command.\n", tui.Code.Render("zrok enable"))
} else {
_, _ = fmt.Fprintf(os.Stdout, tui.Code.Render("Environment")+":\n\n")
_, _ = fmt.Fprintln(os.Stdout, tui.Code.Render("Environment")+":\n")
t := table.NewWriter()
t.SetOutputMirror(os.Stdout)

View File

@ -44,5 +44,5 @@ func main() {
panic(err)
}
fmt.Printf(string(buf[:n]))
fmt.Println(string(buf[:n]))
}