mirror of
https://github.com/juanfont/headscale.git
synced 2026-03-29 21:52:12 +02:00
cmd: Add error check for Persistent Flags
This commit is contained in:
@@ -11,6 +11,10 @@ import (
|
||||
func init() {
|
||||
rootCmd.AddCommand(routesCmd)
|
||||
routesCmd.PersistentFlags().StringP("namespace", "n", "", "Namespace")
|
||||
err := routesCmd.MarkPersistentFlagRequired("namespace")
|
||||
if err != nil {
|
||||
log.Fatalf(err.Error())
|
||||
}
|
||||
routesCmd.AddCommand(listRoutesCmd)
|
||||
routesCmd.AddCommand(enableRouteCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user