From 18de011c810c6dd0d5072072a35f1b0ebf740ce2 Mon Sep 17 00:00:00 2001 From: elij Date: Wed, 7 Jun 2023 12:36:54 -0700 Subject: [PATCH] go fmt formatting --- pkg/camo/proxy.go | 2 +- pkg/htrie/glob_path_chk.go | 4 ++-- pkg/htrie/htrie.go | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/camo/proxy.go b/pkg/camo/proxy.go index 07864b6d..552c67b0 100644 --- a/pkg/camo/proxy.go +++ b/pkg/camo/proxy.go @@ -168,7 +168,7 @@ func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request) { if resp != nil { defer func() { - if err:= resp.Body.Close(); err != nil { + if err := resp.Body.Close(); err != nil { if mlog.HasDebug() { mlog.Debug("error on body close. ignoring.") } diff --git a/pkg/htrie/glob_path_chk.go b/pkg/htrie/glob_path_chk.go index cb4a6a1e..6293b49c 100644 --- a/pkg/htrie/glob_path_chk.go +++ b/pkg/htrie/glob_path_chk.go @@ -47,11 +47,11 @@ func (gpc *GlobPathChecker) parseRule(rule string) (string, string, error) { // AddRule adds a rule to the GlobPathChecker. // The expected rule format is: // -// +// // // Example: // -// |i|/some/subdir/* +// |i|/some/subdir/* // // Allowed flags: // diff --git a/pkg/htrie/htrie.go b/pkg/htrie/htrie.go index 3458fb81..5a629368 100644 --- a/pkg/htrie/htrie.go +++ b/pkg/htrie/htrie.go @@ -298,8 +298,7 @@ func (dt *URLMatcher) CheckURL(u *url.URL) bool { // sanitized, space trimmed, and lowercased... // Basically sanitized in a way similar to: // -// strings.ToLower((*url.URL).Hostname()) -// +// strings.ToLower((*url.URL).Hostname()) func (dt *URLMatcher) CheckHostname(hostname string) bool { hostname = strings.ToLower(hostname) matches := dt.walkFind(hostname)