Skip to content

Commit f8676a1

Browse files
Apply suggestions from code review
Co-authored-by: Matthias Diester <[email protected]>
1 parent 7969040 commit f8676a1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

cmd/bundle/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func Do(ctx context.Context) error {
7373
return fmt.Errorf("mandatory flag --image is not set")
7474
}
7575

76-
// sanity-check the endpoint, if hostname extraction fails, ignore that failure
76+
// check the endpoint, if hostname extraction fails, ignore that failure
7777
if hostname, port, err := image.ExtractHostnamePort(flagValues.image); err == nil {
7878
if !util.TestConnection(hostname, port, 9) {
7979
log.Printf("Warning: a connection test to %s:%d failed. The operation will likely fail.\n", hostname, port)

cmd/git/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func runGitClone(ctx context.Context) error {
164164
return &ExitError{Code: 101, Message: "the 'target' argument must not be empty"}
165165
}
166166

167-
// sanity-check the endpoint, if hostname extraction fails, ignore that failure
167+
// check the endpoint, if hostname extraction fails, ignore that failure
168168
if hostname, port, err := shpgit.ExtractHostnamePort(flagValues.url); err == nil {
169169
if !util.TestConnection(hostname, port, 9) {
170170
log.Printf("Warning: a connection test to %s:%d failed. The operation will likely fail.\n", hostname, port)

pkg/git/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func ExtractHostnamePort(url string) (string, int, error) {
4242
port = 22
4343

4444
default:
45-
return "", 0, fmt.Errorf("Unknown protocol: %s", endpoint.Protocol)
45+
return "", 0, fmt.Errorf("unknown protocol: %s", endpoint.Protocol)
4646
}
4747
}
4848

pkg/image/endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func ExtractHostnamePort(url string) (string, int, error) {
4040
port = 443
4141

4242
default:
43-
return "", 0, fmt.Errorf("Unknown protocol: %s", scheme)
43+
return "", 0, fmt.Errorf("unknown protocol: %s", scheme)
4444
}
4545
}
4646

0 commit comments

Comments
 (0)