ghost-listmonk-connector/utils/errors.go
troneras 1fd7dad8e4 # This is a combination of 2 commits.
# This is the 1st commit message:

first commit

# This is the commit message #2:

fixed cache
2024-08-21 02:08:01 +02:00

19 lines
296 B
Go

package utils
import "fmt"
type CustomError struct {
Code string
Message string
}
func (e *CustomError) Error() string {
return fmt.Sprintf("%s: %s", e.Code, e.Message)
}
func NewError(code, message string) *CustomError {
return &CustomError{
Code: code,
Message: message,
}
}