Skip to content

Commit

Permalink
Use Fatalf vs Errorln
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-ash committed Apr 27, 2023
1 parent 38ce700 commit 2c153c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/node/nodeCreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ func parseCreateNodeCmd(cmd *cobra.Command, args []string) ([]*k3d.Node, string)
// --runtime-label
runtimeLabelsFlag, err := cmd.Flags().GetStringSlice("runtime-label")
if err != nil {
l.Log().Errorln("No runtime-label specified")
l.Log().Fatalln(err)
l.Log().Fatalf("No runtime-label specified: %v", err)
}

runtimeLabels := make(map[string]string, len(runtimeLabelsFlag)+1)
Expand All @@ -163,8 +162,7 @@ func parseCreateNodeCmd(cmd *cobra.Command, args []string) ([]*k3d.Node, string)
// --runtime-ulimit
runtimeUlimitsFlag, err := cmd.Flags().GetStringSlice("runtime-ulimit")
if err != nil {
l.Log().Errorln("No runtime-label specified")
l.Log().Fatalln(err)
l.Log().Fatalf("No runtime-ulimit specified: %v", err)
}

runtimeUlimits := make([]*dockerunits.Ulimit, len(runtimeUlimitsFlag))
Expand Down

0 comments on commit 2c153c3

Please sign in to comment.