Golang flag.Uint64Var() function example
package flag
Uint64Var defines a uint64 flag with specified name (2nd parameter), default value (3rd parameter), and usage string (4th parameter). The argument p (1st parameter) points to a uint64 variable in which to store the value of the flag.
Golang flag.Uint64Var() function usage example
package main
import (
"flag"
"fmt"
)
func main() {
var appID uint64
flag.Uint64Var(&appID, "FBAppID", 108, "Facebook Application ID")
flag.Parse()
fmt.Println(flag.Lookup("FBAppID")) // print the Flag struct
fmt.Println(appID)
}
Output :
&{FBAppID Facebook Application ID 108 108}
108
Reference :
Advertisement
Something interesting
Tutorials
+13k Golang : Calculate elapsed years or months since a date
+8.6k Golang : Progress bar with ∎ character
+9.4k Facebook : Getting the friends list with PHP return JSON format
+15.3k Golang : How to get Unix file descriptor for console and file
+5.5k Clean up Visual Studio For Mac installation failed disk full problem
+41k Golang : How to check if a string contains another sub-string?
+8.9k Golang : GMail API create and send draft with simple upload attachment example
+10k Golang : Get escape characters \u form from unicode characters
+8.3k Swift : Convert (cast) Character to Integer?
+8.8k Yum Error: no such table: packages
+7.1k Golang : Get environment variable