summaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorChloe Kudryavtsev <toast@toast.cafe>2020-01-23 19:41:57 -0500
committerChloe Kudryavtsev <toast@toast.cafe>2020-01-23 19:41:57 -0500
commit462d0a77def48c79aefc2f2dfdae37ee5affce26 (patch)
tree17d49c22f8c3dd159991eb9b34ea51417e57e2ef /main.go
parentunlicense (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.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 0cdf9c4..3e983ab 100644
--- a/main.go
+++ b/main.go
@@ -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")