Manual test versioning looks good

This commit is contained in:
Bel LaPointe
2019-11-21 14:17:45 -07:00
parent fecd343f1b
commit e4632d36ba
4 changed files with 29 additions and 5 deletions

View File

@@ -8,14 +8,16 @@ import (
"log"
"os"
"strings"
"time"
)
var (
Root string
Port string
Head string
Foot string
OAuthServer string
Root string
Port string
Head string
Foot string
OAuthServer string
VersionInterval time.Duration
)
func init() {
@@ -32,6 +34,7 @@ func Refresh() {
as.Append(args.STRING, "port", "port to listen on", "49909")
as.Append(args.STRING, "wrap", "file with http header/footer", "./wrapper.html")
as.Append(args.STRING, "oauth", "oauth URL", "")
as.Append(args.DURATION, "version", "duration to mark versions", "0s")
if err := as.Parse(); err != nil {
panic(err)
}
@@ -52,4 +55,5 @@ func Refresh() {
Head = string(bs[0])
Foot = string(bs[1])
OAuthServer = as.Get("oauth").GetString()
VersionInterval = as.Get("version").GetDuration()
}