awl/pkg/resolvers/QUIC_gccgo.go
Sam Therapy dfa14cbcdf
All checks were successful
continuous-integration/drone/push Build is passing
feat(gccgo): allow compilation with gccgo (#156)
This PR disables quic-go when compiling with gccgo since gccgo does not support generics

Reviewed-on: #156
Reviewed-by: grumbulon <grumbulon@grumbulon.xyz>
2022-11-19 18:25:04 +00:00

26 lines
656 B
Go

// SPDX-License-Identifier: BSD-3-Clause
//go:build gccgo
// TODO: Whenever gccgo supports quic-go, delete this
package resolvers
import (
"errors"
"git.froth.zone/sam/awl/pkg/util"
"github.com/miekg/dns"
)
// QUICResolver is for DNS-over-QUIC queries.
type QUICResolver struct {
opts *util.Options
}
var _ Resolver = (*QUICResolver)(nil)
var errNotImplemented = errors.New("DNS-over-QUIC not supported when running gccgo!")
// LookUp cannot be used with gccgo because gccgo does not (and likely will not) support generics.
func (resolver *QUICResolver) LookUp(msg *dns.Msg) (util.Response, error) {
return util.Response{}, errNotImplemented
}