From e89b85550e53bacaf2c9385375ae084b1f0bda50 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 20 Oct 2024 03:52:56 -0300 Subject: Adapt to latest golang Makefile skeleton --- src/glaze.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') 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) -- cgit v1.2.3