envoid/internal/errors/invalid_flag_value.go
Sagi Dayan 33f99dd65b
All checks were successful
build bin / Make sure build does not fail (push) Successful in 2m51s
Codespell / Check for spelling errors (push) Successful in 22s
Initial commit
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-12-15 17:41:31 +02:00

16 lines
405 B
Go

package errors
import "fmt"
type InvalidFlagValueError struct {
flag string
invalidValue string
}
func (e *InvalidFlagValueError) Error() string {
return fmt.Sprintf("invalid value '%s' for flag --%s", e.invalidValue, e.flag)
}
func NewInvalidFlagValueError(flag string, invalidValue string) *InvalidFlagValueError {
return &InvalidFlagValueError{flag: flag, invalidValue: invalidValue}
}