Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Diester <mddiester@gmail.com>
Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
  • Loading branch information
SaschaSchwarze0 and HeavyWombat committed Jan 5, 2025
1 parent 14bec0c commit 48b2ed6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/bundle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func Do(ctx context.Context) error {
return fmt.Errorf("mandatory flag --image is not set")
}

// sanity-check the endpoint, if hostname extraction fails, ignore that failure
// check the endpoint, if hostname extraction fails, ignore that failure
if hostname, port, err := image.ExtractHostnamePort(flagValues.image); err == nil {
if !util.TestConnection(hostname, port, 9) {
log.Printf("Warning: a connection test to %s:%d failed. The operation will likely fail.\n", hostname, port)
Expand Down
2 changes: 1 addition & 1 deletion cmd/git/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func runGitClone(ctx context.Context) error {
return &ExitError{Code: 101, Message: "the 'target' argument must not be empty"}
}

// sanity-check the endpoint, if hostname extraction fails, ignore that failure
// check the endpoint, if hostname extraction fails, ignore that failure
if hostname, port, err := shpgit.ExtractHostnamePort(flagValues.url); err == nil {
if !util.TestConnection(hostname, port, 9) {
log.Printf("Warning: a connection test to %s:%d failed. The operation will likely fail.\n", hostname, port)
Expand Down
2 changes: 1 addition & 1 deletion pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ExtractHostnamePort(url string) (string, int, error) {
port = 22

default:
return "", 0, fmt.Errorf("Unknown protocol: %s", endpoint.Protocol)
return "", 0, fmt.Errorf("unknown protocol: %s", endpoint.Protocol)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/image/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ExtractHostnamePort(url string) (string, int, error) {
port = 443

default:
return "", 0, fmt.Errorf("Unknown protocol: %s", scheme)
return "", 0, fmt.Errorf("unknown protocol: %s", scheme)
}
}

Expand Down

0 comments on commit 48b2ed6

Please sign in to comment.