16 lines
235 B
Go
16 lines
235 B
Go
package errors
|
|
|
|
import "fmt"
|
|
|
|
type InvalidDirectory struct {
|
|
Path string
|
|
}
|
|
|
|
func (err *InvalidDirectory) Error() string {
|
|
if err.Path == "" {
|
|
return "Invalid directory"
|
|
}
|
|
|
|
return fmt.Sprintf("Invalid directory '%s'", err.Path)
|
|
}
|