Refactored flags in main.go.
This commit is contained in:
parent
a464a11ea8
commit
906f73c8a6
@ -20,12 +20,14 @@ import (
|
||||
|
||||
var version string
|
||||
|
||||
var showVersion *bool = flag.Bool("v", false, "show version")
|
||||
var listenAddress *string = flag.String("listen", "/var/run/dwelling-home/sock", "listen address (ip:port|unix_path)")
|
||||
var captchaExpiry *time.Duration = flag.Duration("captcha-expiry", 10*time.Minute, "CAPTCHA expiry (e.g. 5m, 60s)")
|
||||
var guestbookOwner *string = flag.String("guestbook-owner", "Admin", "name of a guestbook owner")
|
||||
var guestbookPageSize *int64 = flag.Int64("guestbook-page-size", 60, "size of a guestbook page")
|
||||
var databasesPath *string = flag.String("database-path", "/var/lib/dwelling-home", "path to a directory where to store DB files")
|
||||
var (
|
||||
showVersion = flag.Bool("v", false, "show version")
|
||||
listenAddress = flag.String("listen", "/var/run/dwelling-home/sock", "listen address (ip:port|unix_path)")
|
||||
captchaExpiry = flag.Duration("captcha-expiry", 10*time.Minute, "CAPTCHA expiry (e.g. 5m, 60s)")
|
||||
guestbookOwner = flag.String("guestbook-owner", "Admin", "name of a guestbook owner")
|
||||
guestbookPageSize = flag.Int64("guestbook-page-size", 60, "size of a guestbook page")
|
||||
databasesPath = flag.String("database-path", "/var/lib/dwelling-home", "path to a directory where to store DB files")
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
Loading…
Reference in New Issue
Block a user