AdGuardHome/internal/dhcpsvc/errors.go

22 lines
536 B
Go
Raw Normal View History

package dhcpsvc
2024-03-12 14:45:11 +00:00
import (
"fmt"
"github.com/AdguardTeam/golibs/errors"
)
const (
// errNilConfig is returned when a nil config met.
errNilConfig errors.Error = "config is nil"
// errNoInterfaces is returned when no interfaces found in configuration.
errNoInterfaces errors.Error = "no interfaces specified"
)
2024-03-12 14:45:11 +00:00
// newMustErr returns an error that indicates that valName must be as must
// describes.
func newMustErr(valName, must string, val fmt.Stringer) (err error) {
return fmt.Errorf("%s %s must %s", valName, val, must)
}