move Filesystem config validation to vfs

This commit is contained in:
Manuel Reithuber
2021-06-19 12:24:43 +02:00
committed by Nicola Murino
parent f2f612b450
commit f19937b715
10 changed files with 234 additions and 206 deletions

20
utils/errors.go Normal file
View File

@@ -0,0 +1,20 @@
package utils
import "fmt"
// ValidationError raised if input data is not valid
type ValidationError struct {
err string
}
// Validation error details
func (e *ValidationError) Error() string {
return fmt.Sprintf("Validation error: %s", e.err)
}
// NewValidationError returns a validation errors
func NewValidationError(error string) *ValidationError {
return &ValidationError{
err: error,
}
}