aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2023-03-17 14:35:01 +0100
committerRasmus Dahlberg <rasmus@rgdd.se>2023-03-17 14:35:01 +0100
commitfe4f2c413996fbcbfecce1e138cffa8a612dfceb (patch)
tree0cdd15585192e729952b72de5cfa11c3657a771b
parented5d64ecd944881aca33c59684a612b6e45de21b (diff)
Add uint64 to ctflag
-rw-r--r--internal/ctflag/ctflag.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/ctflag/ctflag.go b/internal/ctflag/ctflag.go
index c6a7559..1309afd 100644
--- a/internal/ctflag/ctflag.go
+++ b/internal/ctflag/ctflag.go
@@ -71,6 +71,12 @@ func String(fs *flag.FlagSet, opt *string, short, long, value string) {
fs.StringVar(opt, long, value, "")
}
+// Uint64 adds a new uint64 option to a flag set
+func Uint64(fs *flag.FlagSet, opt *uint64, short, long string, value uint64) {
+ fs.Uint64Var(opt, short, value, "")
+ fs.Uint64Var(opt, long, value, "")
+}
+
// Bool adds a new bool option to a flag set
func Bool(fs *flag.FlagSet, opt *bool, short, long string, value bool) {
fs.BoolVar(opt, short, value, "")