Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tbocek committed Dec 30, 2020
1 parent 66dc707 commit defcaa7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ all: dep build test
test:
go test ./... -v
build:
go build -o fastauth
go build -o $(NAME)
dep: go.mod
go mod tidy
go get -v -u ./...
Expand Down
6 changes: 6 additions & 0 deletions fastauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func NewOpts() *Opts {
flag.BoolVar(&opts.LdapServer, "ldap-server", LookupEnv("LDAP_SERVER") != "", "Enable ldap server. In dev mode these are enabled by default")
flag.BoolVar(&opts.DetailedError, "details", LookupEnv("DETAILS") != "", "Enable detailed errors")
flag.BoolVar(&opts.Limiter, "limiter", LookupEnv("LIMITER") != "", "Enable limiter, disabled in dev mode")

flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
flag.PrintDefaults()
}

flag.Parse()
return opts
}
Expand Down

0 comments on commit defcaa7

Please sign in to comment.