diff options
| author | 2020-01-23 19:41:57 -0500 | |
|---|---|---|
| committer | 2020-01-23 19:41:57 -0500 | |
| commit | 462d0a77def48c79aefc2f2dfdae37ee5affce26 (patch) | |
| tree | 17d49c22f8c3dd159991eb9b34ea51417e57e2ef /main.go | |
| parent | unlicense (diff) | |
add support for config files
2.2.0 will not be released until libuconf is stabilized
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,7 +1,6 @@ package main import ( - "flag" "fmt" "os" @@ -9,6 +8,7 @@ import ( "github.com/valyala/fasthttp" "toast.cafe/x/brpaste/v2/http" "toast.cafe/x/brpaste/v2/storage" + "toast.cafe/x/libuconf" ) var s settings @@ -21,6 +21,7 @@ type settings struct { func main() { // ---- Flags + flag := libuconf.DefaultSet flag.StringVar(&s.Bind, "bind", ":8080", "address to bind to") flag.StringVar(&s.Redis, "redis", "redis://localhost:6379", "redis connection string") flag.StringVar(&s.Storage, "storage", "redis", "type of storage to use") |
