1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/api/http/errors/conflict.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
335 B
Go
Raw Normal View History

package errors
import "errors"
type ConflictError struct {
msg string
}
func (e *ConflictError) Error() string {
return e.msg
}
func NewConflictError(msg string) *ConflictError {
return &ConflictError{msg: msg}
}
func IsConflictError(err error) bool {
var conflictError *ConflictError
return errors.As(err, &conflictError)
}