Improved project structure
This commit is contained in:
parent
3a002a7562
commit
bd73132a30
18 changed files with 33 additions and 15 deletions
15
src/errors/InvalidPath.go
Normal file
15
src/errors/InvalidPath.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue