diff --git a/v2/var.go b/v2/var.go index c60a9d2..2f42740 100644 --- a/v2/var.go +++ b/v2/var.go @@ -92,7 +92,7 @@ func (s *Set) addFlag(p Value, name string, short rune, helpvalue ...string) Opt opt.where = where } if opt.short == 0 && opt.long == "" { - fmt.Fprintf(stderr, opt.where+": no short or long option given") + fmt.Fprint(stderr, opt.where+": no short or long option given") exit(1) } s.AddOption(opt) diff --git a/var.go b/var.go index fd816b9..f4d8cfc 100644 --- a/var.go +++ b/var.go @@ -55,7 +55,7 @@ func (s *Set) VarLong(p Value, name string, short rune, helpvalue ...string) Opt opt.where = fmt.Sprintf("%s:%d", file, line) } if opt.short == 0 && opt.long == "" { - fmt.Fprintf(stderr, opt.where+": no short or long option given") + fmt.Fprint(stderr, opt.where+": no short or long option given") exit(1) } s.AddOption(opt)