lint (errorlint) (#2644)

This commit is contained in:
mmetc 2023-12-18 09:35:28 +01:00 committed by GitHub
parent c2c173ac7e
commit 08694adf1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 33 deletions

View file

@ -742,7 +742,7 @@ func (c *Client) CreateAlert(machineID string, alertList []*models.Alert) ([]str
if machineID != "" {
owner, err = c.QueryMachineByID(machineID)
if err != nil {
if errors.Cause(err) != UserNotExists {
if !errors.Is(err, UserNotExists) {
return nil, fmt.Errorf("machine '%s': %w", machineID, err)
}