Skip to content

Commit

Permalink
Merge pull request #181 from marquiz/devel/golangci-lint-1
Browse files Browse the repository at this point in the history
chore: code cleanup
  • Loading branch information
elezar authored Jan 11, 2024
2 parents 39b12a7 + 707429f commit d5f9a68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pkg/cdi/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ devices:
}

select {
case _ = <-stopCh:
case <-stopCh:
return
default:
}
Expand Down Expand Up @@ -748,7 +748,7 @@ devices:
}

select {
case _ = <-stopCh:
case <-stopCh:
return
default:
}
Expand All @@ -771,10 +771,10 @@ devices:
// from updater()'s create+write+rename loop)
for {
select {
case _ = <-stopCh:
case <-stopCh:
go osSync()
return
case _ = <-sync.C:
case <-sync.C:
go osSync()
sync.Reset(2 * time.Second)
}
Expand Down Expand Up @@ -803,7 +803,7 @@ devices:
select {
case err = <-errCh:
require.NotNil(t, err)
case _ = <-done:
case <-done:
close(stopCh)
wg.Wait()
return
Expand Down
2 changes: 1 addition & 1 deletion schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func Load(source string) (*Schema, error) {
case strings.HasPrefix(source, "http://"):
case strings.HasPrefix(source, "https://"):
default:
if strings.Index(source, "://") < 0 {
if !strings.Contains(source, "://") {
source, err = filepath.Abs(source)
if err != nil {
return nil, fmt.Errorf("failed to get JSON schema absolute path for %s: %w",
Expand Down

0 comments on commit d5f9a68

Please sign in to comment.