# This is the 1st commit message: first commit # This is the commit message #2: fixed cache
19 lines
296 B
Go
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,
|
|
}
|
|
}
|