mirror of https://github.com/k3s-io/k3s
remove unused GetFlagInt32 func
parent
395f6fda81
commit
7d1461be8e
|
@ -354,15 +354,6 @@ func GetFlagInt64(cmd *cobra.Command, flag string) int64 {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assumes the flag has a default value.
|
|
||||||
func GetFlagInt32(cmd *cobra.Command, flag string) int32 {
|
|
||||||
i, err := cmd.Flags().GetInt32(flag)
|
|
||||||
if err != nil {
|
|
||||||
glog.Fatalf("error accessing flag %s for command %s: %v", flag, cmd.Name(), err)
|
|
||||||
}
|
|
||||||
return i
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetFlagDuration(cmd *cobra.Command, flag string) time.Duration {
|
func GetFlagDuration(cmd *cobra.Command, flag string) time.Duration {
|
||||||
d, err := cmd.Flags().GetDuration(flag)
|
d, err := cmd.Flags().GetDuration(flag)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue