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