Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Joeyyy09 <imt_2021063@iiitm.ac.in>
  • Loading branch information
joeyyy09 committed May 16, 2024
1 parent 8ee8fad commit 270971e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions pkg/kwok/server/debugging_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,7 @@ func readLogs(ctx context.Context, logsFile string, opts *logOptions, stdout, st

if recreated {
newF, err := os.Open(logsFile)
if err != nil {
if os.IsNotExist(err) {
continue
}
if err != nil && !os.IsNotExist(err) {
return fmt.Errorf("failed to open log file %q: %w", logsFile, err)
}

Expand Down
9 changes: 4 additions & 5 deletions pkg/utils/slices/slices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package slices

import (
"errors"
"fmt"
"reflect"
"testing"
"fmt"
)

func TestContains(t *testing.T) {
Expand Down Expand Up @@ -445,13 +445,13 @@ func TestGroupBy(t *testing.T) {
},
{
name: "test group by length",
args: args[[]string, string, string]{
args: args[[]string, string, string]{
s: []string{"apple", "banana", "cherry", "date"},
f: func(s string) string {
f: func(s string) string {
return fmt.Sprintf("%d", len(s))
},
},
want: map[string][]string{
want: map[string][]string{
"5": {"apple"},
"6": {"banana", "cherry"},
"4": {"date"},
Expand All @@ -476,4 +476,3 @@ func TestGroupBy(t *testing.T) {
})
}
}

0 comments on commit 270971e

Please sign in to comment.