Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ linters:
- godot
- goheader
- gosec
- intrange
- misspell
- nakedret
- paralleltest
Expand Down
2 changes: 1 addition & 1 deletion github/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func testAddURLOptions(t *testing.T, url string, v any, want string) {
t.Helper()

vt := reflect.Indirect(reflect.ValueOf(v)).Type()
for i := 0; i < vt.NumField(); i++ {
for i := range vt.NumField() {
field := vt.Field(i)
if alias, ok := field.Tag.Lookup("url"); ok {
if alias == "" {
Expand Down
4 changes: 2 additions & 2 deletions github/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func stringifyValue(w *bytes.Buffer, val reflect.Value) {
fmt.Fprintf(w, `"%v"`, v)
case reflect.Slice:
w.WriteByte('[')
for i := 0; i < v.Len(); i++ {
for i := range v.Len() {
if i > 0 {
w.WriteByte(' ')
}
Expand All @@ -62,7 +62,7 @@ func stringifyValue(w *bytes.Buffer, val reflect.Value) {
w.WriteByte('{')

var sep bool
for i := 0; i < v.NumField(); i++ {
for i := range v.NumField() {
fv := v.Field(i)
if fv.Kind() == reflect.Pointer && fv.IsNil() {
continue
Expand Down
Loading