15 lines
313 B
Go
15 lines
313 B
Go
package errors
|
|
|
|
import "fmt"
|
|
|
|
type EnvironmentExistsError struct {
|
|
name string
|
|
}
|
|
|
|
func (e *EnvironmentExistsError) Error() string {
|
|
return fmt.Sprintf("environment %s already exists", e.name)
|
|
}
|
|
|
|
func NewEnvironmentExistsError(name string) *EnvironmentExistsError {
|
|
return &EnvironmentExistsError{name: name}
|
|
}
|