diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/glaze.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/glaze.go b/src/glaze.go index f5b2886..1431ba4 100644 --- a/src/glaze.go +++ b/src/glaze.go @@ -15,7 +15,7 @@ import ( "strings" "syscall" - + "guuid" g "gobang" ) @@ -204,7 +204,7 @@ func handlerForDynPath(path string) (pathInfo, func(pathInfo, http.ResponseWrite func handlerFor(path string) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - id := g.NewUUID() + id := guuid.New() g.Info("in-request", "in-request", "path", path, "id", id) defer g.Info("in-response", "in-response", "path", path, "id", id) @@ -268,10 +268,14 @@ func start(listener net.Listener) { g.FatalIf(err) } +func Init() { + g.Init(slog.Group("versions", "gobang", g.Version, "this", Version)) +} + func Main() { - g.Init(slog.Group("versions", "gobang", g.Version, "this", version)) + Init() addr := parseArgs(os.Args) listener := listen(addr) start(listener) |