Skip to content

Commit 57cdc7f

Browse files
committed
fix lint
1 parent 5eee839 commit 57cdc7f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ linters:
1818
- gochecksumtype
1919
- gocritic
2020
- gomoddirectives
21-
- gomodguard
21+
- gomodguard_v2
2222
- gosec
2323
- gosmopolitan
2424
- loggercheck

internal/cmd/output/output.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func (o *Table[T]) MarkFieldAsDeprecated(field string, message string) *Table[T]
225225
// AddAllowedFields reads all first level fieldnames of the struct and allows them to be used.
226226
func (o *Table[T]) AddAllowedFields(obj T) *Table[T] {
227227
v := reflect.ValueOf(obj)
228-
if v.Kind() == reflect.Ptr {
228+
if v.Kind() == reflect.Pointer {
229229
v = v.Elem()
230230
}
231231
if v.Kind() != reflect.Struct {

internal/cmd/util/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ func IsNil(v any) bool {
246246
}
247247
val := reflect.ValueOf(v)
248248
switch val.Kind() {
249-
case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
249+
case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Pointer, reflect.Slice:
250250
return val.IsNil()
251251
default:
252252
return false

0 commit comments

Comments
 (0)