Initial commit
This commit is contained in:
14
config/errors.go
Normal file
14
config/errors.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package config
|
||||
|
||||
import "fmt"
|
||||
|
||||
// ValidationError represents a config validation error
|
||||
type ValidationError struct {
|
||||
Param string
|
||||
Value string
|
||||
Reason string
|
||||
}
|
||||
|
||||
func (e ValidationError) Error() string {
|
||||
return fmt.Sprintf("invalid value '%s' for %s: %s", e.Value, e.Param, e.Reason)
|
||||
}
|
||||
Reference in New Issue
Block a user