diff --git a/experimental/libbox/dns.go b/experimental/libbox/dns.go index bfb8dc53..7e100f9a 100644 --- a/experimental/libbox/dns.go +++ b/experimental/libbox/dns.go @@ -120,6 +120,10 @@ func (p *platformLocalDNSTransport) Lookup(ctx context.Context, domain string, s }) } +type Func interface { + Invoke() error +} + type ExchangeContext struct { context context.Context message mDNS.Msg @@ -153,6 +157,6 @@ func (c *ExchangeContext) ErrorCode(code int32) { c.error = dns.RCodeError(code) } -func (c *ExchangeContext) Errno(errno int32) { - c.error = syscall.Errno(errno) +func (c *ExchangeContext) ErrnoCode(code int32) { + c.error = syscall.Errno(code) } diff --git a/experimental/libbox/setup.go b/experimental/libbox/setup.go index 4afcecf2..e9caf773 100644 --- a/experimental/libbox/setup.go +++ b/experimental/libbox/setup.go @@ -35,11 +35,3 @@ func Version() string { func FormatBytes(length int64) string { return humanize.IBytes(uint64(length)) } - -type Func interface { - Invoke() error -} - -type BoolFunc interface { - Invoke() bool -}