gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/errors/invalid-operation.go (about) 1 package errors 2 3 type InvalidOperation struct { 4 Operation string 5 } 6 7 func NewInvalidOperation(operation string) InvalidOperation { 8 return InvalidOperation{Operation: operation} 9 } 10 11 func (e InvalidOperation) Error() string { 12 return "非法的操作: " + e.Operation 13 }