Skip to content

Commit

Permalink
fix: Resolve lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlcek authored and subpop committed Nov 14, 2024
1 parent ebf6289 commit a5c2b1d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,16 @@ func connectAction(ctx *cli.Context) error {
level: log.LevelError,
message: fmt.Errorf("cannot connect to Red Hat Subscription Management: %w",
err)}
fmt.Printf(errorPrefix + " Cannot connect to Red Hat Subscription Management\n")
fmt.Print(errorPrefix + " Cannot connect to Red Hat Subscription Management\n")
} else {
fmt.Printf(connectedPrefix + " " + returnedMsg + "\n")
fmt.Print(connectedPrefix + " " + returnedMsg + "\n")
}
durations["rhsm"] = time.Since(start)

/* 2. Register insights-client */
if errors, exist := errorMessages["rhsm"]; exist {
if errors.level == log.LevelError {
fmt.Printf(disconnectedPrefix + " Skipping connection to Red Hat Insights\n")
fmt.Print(disconnectedPrefix + " Skipping connection to Red Hat Insights\n")
}
} else {
start = time.Now()
Expand All @@ -309,9 +309,9 @@ func connectAction(ctx *cli.Context) error {
level: log.LevelError,
message: fmt.Errorf("cannot connect to Red Hat Insights: %w",
err)}
fmt.Printf(errorPrefix + " Cannot connect to Red Hat Insights\n")
fmt.Print(errorPrefix + " Cannot connect to Red Hat Insights\n")
} else {
fmt.Printf(connectedPrefix + " Connected to Red Hat Insights\n")
fmt.Print(connectedPrefix + " Connected to Red Hat Insights\n")
}
durations["insights"] = time.Since(start)
}
Expand Down Expand Up @@ -365,7 +365,7 @@ func connectAction(ctx *cli.Context) error {
message: fmt.Errorf("cannot get the user profile: %w",
err)}
} else {
fmt.Printf(infoPrefix + " Enabled console.redhat.com services: ")
fmt.Print(infoPrefix + " Enabled console.redhat.com services: ")
showConfProfile(&profile)
fmt.Printf("\n")
}
Expand Down Expand Up @@ -429,7 +429,7 @@ func disconnectAction(ctx *cli.Context) error {
level: log.LevelError,
message: fmt.Errorf("cannot disconnect from Red Hat Insights: %w",
err)}
fmt.Printf(errorPrefix + " Cannot disconnect from Red Hat Insights\n")
fmt.Print(errorPrefix + " Cannot disconnect from Red Hat Insights\n")
} else {
fmt.Print(disconnectedPrefix + " Disconnected from Red Hat Insights\n")
}
Expand All @@ -442,9 +442,9 @@ func disconnectAction(ctx *cli.Context) error {
level: log.LevelError,
message: fmt.Errorf("cannot disconnect from Red Hat Subscription Management: %w",
err)}
fmt.Printf(errorPrefix + " Cannot disconnect from Red Hat Subscription Management\n")
fmt.Print(errorPrefix + " Cannot disconnect from Red Hat Subscription Management\n")
} else {
fmt.Printf(disconnectedPrefix + " Disconnected from Red Hat Subscription Management\n")
fmt.Print(disconnectedPrefix + " Disconnected from Red Hat Subscription Management\n")
}
durations["rhsm"] = time.Since(start)

Expand Down Expand Up @@ -573,13 +573,13 @@ func statusAction(ctx *cli.Context) (err error) {
if machineReadable {
systemStatus.RHSMConnected = false
} else {
fmt.Printf(disconnectedPrefix + " Not connected to Red Hat Subscription Management\n")
fmt.Print(disconnectedPrefix + " Not connected to Red Hat Subscription Management\n")
}
} else {
if machineReadable {
systemStatus.RHSMConnected = true
} else {
fmt.Printf(connectedPrefix + " Connected to Red Hat Subscription Management\n")
fmt.Print(connectedPrefix + " Connected to Red Hat Subscription Management\n")
}
}

Expand Down

0 comments on commit a5c2b1d

Please sign in to comment.