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
+8.2k Golang : HttpRouter multiplexer routing example
+6.4k PHP : Proper way to get UTF-8 character or string length
+6.1k Golang : Get missing location after unmarshal binary and gob decode time.
+14.6k Golang : Execute function at intervals or after some delay
+5.6k PHP : Convert string to timestamp or datestamp before storing to database(MariaDB/MySQL)
+8.1k Golang : Check from web if Go application is running or not
+9.7k Golang : Eroding and dilating image with OpenCV example
+22.2k Golang : Securing password with salt
+14.5k Golang : How to determine if user agent is a mobile device example
+21.6k Golang : Encrypt and decrypt data with TripleDES
+14.8k Golang : Find commonalities in two slices or arrays example
+11.1k Golang : Read until certain character to break for loop