mtu can be set via command line

added also a test for this

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2023-10-06 11:52:56 +02:00
committed by Jonathon Anderson
parent 4cf230cadd
commit a7056e2bb8
3 changed files with 26 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ func createFlags(baseCmd *cobra.Command, excludeList []string,
case "uint":
converters = append(converters, func() error {
if !util.InSlice(GetUnsetVerbs(), *ptr) && *ptr != "" {
_, err := strconv.ParseUint(myType.Tag.Get(*ptr), 10, 32)
_, err := strconv.ParseUint(*ptr, 10, 32)
if err != nil {
return err
}