Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: code cleanup #181

Merged
merged 2 commits into from
Jan 11, 2024
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
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