Pass things around via query params

This commit is contained in:
bel
2019-10-20 16:39:26 -06:00
parent fb02cc994a
commit da6eaca26f
2 changed files with 27 additions and 8 deletions

View File

@@ -11,10 +11,11 @@ import (
)
var (
Root string
Port string
Head string
Foot string
Root string
Port string
Head string
Foot string
OAuthServer string
)
func init() {
@@ -30,6 +31,7 @@ func Refresh() {
as.Append(args.STRING, "root", "root dir path", "./public")
as.Append(args.STRING, "port", "port to listen on", "39909")
as.Append(args.STRING, "wrap", "file with http header/footer", "./wrapper.html")
as.Append(args.STRING, "oauth", "oauth URL", "")
if err := as.Parse(); err != nil {
panic(err)
}
@@ -49,4 +51,5 @@ func Refresh() {
Port = ":" + strings.TrimPrefix(as.Get("port").GetString(), ":")
Head = string(bs[0])
Foot = string(bs[1])
OAuthServer = as.Get("oauth").GetString()
}