Skip to content

Commit

Permalink
go fmt formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dropwhile committed Jun 7, 2023
1 parent 1f86cb5 commit 18de011
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/camo/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/htrie/glob_path_chk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//
// <pipe-character><flags><pipe-character><match-url>
// <pipe-character><flags><pipe-character><match-url>
//
// Example:
//
// |i|/some/subdir/*
// |i|/some/subdir/*
//
// Allowed flags:
//
Expand Down
3 changes: 1 addition & 2 deletions pkg/htrie/htrie.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 18de011

Please sign in to comment.