1
0
Fork 0

Refactored flags in main.go.

This commit is contained in:
Alexander Andreev 2023-09-24 21:33:08 +04:00
parent a464a11ea8
commit 906f73c8a6
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 8 additions and 6 deletions

View File

@ -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()