-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove range uses case in HTTP status (#90)
Remove range uses case in HTTP status
- Loading branch information
1 parent
c561d44
commit 8b9d590
Showing
7 changed files
with
1,317 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
branches: [ main ] | ||
|
||
env: | ||
GO_VERSION: 1.19.4 | ||
GO_VERSION: 1.20.1 | ||
|
||
jobs: | ||
run: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= | ||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | ||
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= | ||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | ||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= | ||
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= | ||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= | ||
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= | ||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= | ||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= | ||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Code generated by usestdlibvars, DO NOT EDIT. | ||
|
||
package {{ .PackageName }} | ||
|
||
import "net/http" | ||
|
||
func _() error { | ||
resp, err := http.DefaultClient.Do(&http.Request{}) | ||
if err != nil { | ||
return err | ||
} | ||
defer func() { _ = resp.Body.Close() }() | ||
{{- range $key, $value := .Mapping }} | ||
if resp.StatusCode < {{ $key }} { | ||
return nil | ||
} else if resp.StatusCode < {{ $key }} { | ||
return nil | ||
} | ||
{{- end }} | ||
{{- range $key, $value := .Mapping }} | ||
if resp.StatusCode > {{ $key }} { | ||
return nil | ||
} else if resp.StatusCode > {{ $key }} { | ||
return nil | ||
} | ||
{{- end }} | ||
{{- range $key, $value := .Mapping }} | ||
if resp.StatusCode <= {{ $key }} { | ||
return nil | ||
} else if resp.StatusCode < {{ $key }} { | ||
return nil | ||
} | ||
{{- end }} | ||
{{- range $key, $value := .Mapping }} | ||
if resp.StatusCode >= {{ $key }} { | ||
return nil | ||
} else if resp.StatusCode > {{ $key }} { | ||
return nil | ||
} | ||
{{- end }} | ||
return nil | ||
} |
Oops, something went wrong.