use multierror.Append instead of append

Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
This commit is contained in:
Roberto Hidalgo 2023-06-26 13:02:58 -04:00 committed by GitHub
parent 787cc693cd
commit 8e5a66b2f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,7 @@ func (c *RemoteClient) Put(data []byte) error {
if !ok {
var resultErr error
for _, respError := range resp.Errors {
resultErr = append(resultErr, errors.New(respError.What))
resultErr = multierror.Append(resultErr, errors.New(respError.What))
}
return fmt.Errorf("consul CAS failed with transaction errors: %w", resultErr)
}