16 lines
316 B
Go
16 lines
316 B
Go
package errors
|
|
|
|
import "fmt"
|
|
|
|
type ErrorGetUserByName struct {
|
|
Username string
|
|
}
|
|
|
|
func (e ErrorGetUserByName) Error() string {
|
|
return fmt.Sprintf("could not get user \"%s\" by name", e.Username)
|
|
}
|
|
|
|
func NewErrorGetUserByName(username string) *ErrorGetUserByName {
|
|
return &ErrorGetUserByName{Username: username}
|
|
}
|