Debian Codegraph @

internal/pack/errors.go

raw
1 package pack
2
3 import "fmt"
4
5 // Error represents a packing error.
6 type Error struct{ Err string }
7
8 func (e *Error) Error() string { return "dns packing: " + e.Err }
9
10 func Errorf(format string, a ...any) *Error { return &Error{Err: fmt.Sprintf(format, a...)} }
11
12 var ErrBuf = &Error{Err: "buffer size too small"} // ErrBuf indicates that the buffer used is too small for the message.