Skip to content

Commit 31c118a

Browse files
committed
fix
1 parent 8091e31 commit 31c118a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/args/unmarshal.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ func set(dest reflect.Value, argNameWords []string, value string) error {
282282
}
283283

284284
// Make sure array is big enough to access the correct index.
285-
diff := int(index) - dest.Len() //nolint:gosec
285+
diff := int(index) - dest.Len()
286286
switch {
287287
case diff > 0:
288-
return &MissingIndicesInArrayError{IndexToInsert: int(index), CurrentLength: dest.Len()} //nolint:gosec
288+
return &MissingIndicesInArrayError{IndexToInsert: int(index), CurrentLength: dest.Len()}
289289
case diff == 0:
290290
// Append one element to our slice.
291291
dest.Set(reflect.AppendSlice(dest, reflect.MakeSlice(dest.Type(), 1, 1)))
@@ -294,7 +294,7 @@ func set(dest reflect.Value, argNameWords []string, value string) error {
294294
}
295295

296296
// Recursively call set without the index word
297-
return set(dest.Index(int(index)), argNameWords[1:], value) //nolint:gosec
297+
return set(dest.Index(int(index)), argNameWords[1:], value)
298298

299299
case reflect.Map:
300300
// If map is nil we create it.

internal/terminal/terminal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ func Style(msg string, styles ...color.Attribute) string {
1515
}
1616

1717
func GetWidth() int {
18-
w, _, err := term.GetSize(int(os.Stderr.Fd())) //nolint:gosec
18+
w, _, err := term.GetSize(int(os.Stderr.Fd()))
1919
if err != nil {
2020
return -1
2121
}
2222
return w
2323
}
2424

2525
func GetHeight() int {
26-
_, h, err := term.GetSize(int(os.Stderr.Fd())) //nolint:gosec
26+
_, h, err := term.GetSize(int(os.Stderr.Fd()))
2727
if err != nil {
2828
return -1
2929
}

0 commit comments

Comments
 (0)