Fix lint errors: handle errors, use fmt.Fprintf, apply De Morgan's law, use switch statements
Amp-Thread-ID: https://ampcode.com/threads/T-afcf56b0-a8bc-4310-bb59-1b63e1d70c89 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -184,10 +184,10 @@ var closeEligibleEpicsCmd = &cobra.Command{
|
||||
Reason: "All children completed",
|
||||
})
|
||||
if err != nil || !resp.Success {
|
||||
errMsg := "unknown error"
|
||||
errMsg := ""
|
||||
if err != nil {
|
||||
errMsg = err.Error()
|
||||
} else {
|
||||
} else if !resp.Success {
|
||||
errMsg = resp.Error
|
||||
}
|
||||
fmt.Fprintf(os.Stderr, "Error closing %s: %s\n", epicStatus.Epic.ID, errMsg)
|
||||
|
||||
Reference in New Issue
Block a user