1.18에는 flag.TextVar없음?

This commit is contained in:
2023-06-21 18:39:56 +09:00
parent f385d6a7b8
commit b61c5862cc

View File

@ -1,7 +1,6 @@
package flagx
import (
"encoding"
"flag"
"fmt"
"os"
@ -125,9 +124,6 @@ func Duration(name string, value time.Duration, usage string) *time.Duration {
return findProperFlagSet(name).Duration(name, value, usage)
}
func TextVar(p encoding.TextUnmarshaler, name string, value encoding.TextMarshaler, usage string) {
findProperFlagSet(name).TextVar(p, name, value, usage)
}
func Func(name, usage string, fn func(string) error) {
findProperFlagSet(name).Func(name, usage, fn)
}