Sam Therapy
64768f0956
All checks were successful
continuous-integration/drone/push Build is passing
Centralize them in one place Reviewed-on: #161 Reviewed-by: grumbulon <grumbulon@grumbulon.xyz>
19 lines
377 B
Go
19 lines
377 B
Go
package util
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
)
|
|
|
|
// ErrHTTPStatus is returned when DoH returns a bad status code.
|
|
type ErrHTTPStatus struct {
|
|
// Status code
|
|
Code int
|
|
}
|
|
|
|
func (e *ErrHTTPStatus) Error() string {
|
|
return fmt.Sprintf("doh server responded with HTTP %d", e.Code)
|
|
}
|
|
|
|
// ErrNotError is an error that is not actually an error.
|
|
var ErrNotError = errors.New("not an error")
|