You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go run test/test_redis.go -config /etc/config.ini
flag provided but not defined: -config
Usage of /tmp/go-build929316002/command-line-arguments/_obj/a.out:
-redis:d=false: debug flag for go-redis
exit status 2
The text was updated successfully, but these errors were encountered:
calling flag.Parse() in init() breaks flags module
$ cat test/test_redis.go
package main
import (
"fmt"
"flag"
redis "Go-Redis"
)
func main() {
var configfile string
flag.StringVar(&configfile, "config", "/etc/config.ini", "configuration file")
flag.Parse()
fmt.Println("Config file", configfile)
--- output ---
go run test/test_redis.go -config /etc/config.ini
flag provided but not defined: -config
Usage of /tmp/go-build929316002/command-line-arguments/_obj/a.out:
-redis:d=false: debug flag for go-redis
exit status 2
The text was updated successfully, but these errors were encountered: