diff options
author | EuAndreh <eu@euandre.org> | 2024-11-10 09:12:43 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-11-10 09:12:43 -0300 |
commit | dedaa29f66475708342b8995ea7d56d7d7df42ba (patch) | |
tree | f157ece4d37e6c574ab3631ff1b009e0126d6ed5 | |
parent | src/glaze.go: Turn UUID into string for log (diff) | |
download | glaze-dedaa29f66475708342b8995ea7d56d7d7df42ba.tar.gz glaze-dedaa29f66475708342b8995ea7d56d7d7df42ba.tar.xz |
src/glaze.go: Improve spacing of struct braces
-rw-r--r-- | src/glaze.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glaze.go b/src/glaze.go index efb9ab9..c70a2ec 100644 --- a/src/glaze.go +++ b/src/glaze.go @@ -21,9 +21,9 @@ import ( -type patternPath struct {} +type patternPath struct{} -type pathInfo struct { +type pathInfo struct{ pattern string path string label string @@ -97,8 +97,8 @@ func handleProxy(info pathInfo, w http.ResponseWriter, r *http.Request) error { target.Scheme = "http" target.Host = "localhost" - httpClient := http.Client { - Transport: &http.Transport { + httpClient := http.Client{ + Transport: &http.Transport{ DialContext: func(_ context.Context, _ string, _ string) (net.Conn, error) { return net.Dial("unix", info.path) }, @@ -192,7 +192,7 @@ func handlerForDynPath(path string) (pathInfo, func(pathInfo, http.ResponseWrite label, fn := handlerFuncFor(fileInfo.Mode()) g.Info("Handler picked", "handler-picked", "label", label) - info = pathInfo { + info = pathInfo{ path: path, label: label, fileHandle: fileHandle, @@ -262,7 +262,7 @@ func listen(fromAddr string) net.Listener { } func start(listener net.Listener) { - server := http.Server {} + server := http.Server{} err := server.Serve(listener) g.FatalIf(err) } |