all: sync with master

This commit is contained in:
Ainar Garipov
2024-03-12 17:45:11 +03:00
parent fbc0d981ba
commit 6f7bfd6c9c
93 changed files with 2828 additions and 1270 deletions

View File

@@ -1,6 +1,10 @@
package dhcpsvc
import "github.com/AdguardTeam/golibs/errors"
import (
"fmt"
"github.com/AdguardTeam/golibs/errors"
)
const (
// errNilConfig is returned when a nil config met.
@@ -9,3 +13,9 @@ const (
// errNoInterfaces is returned when no interfaces found in configuration.
errNoInterfaces errors.Error = "no interfaces specified"
)
// 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)
}