Pass things around via query params
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user