Skip to content
File

Blob: spec/mocks/resolver.go

go22 lines
1package mocks
2 
3import (
4 "context"
5 
6 "github.com/stretchr/testify/mock"
7)
8 
9type Resolver struct {
10 mock.Mock
11}
12 
13func (r *Resolver) LookupCNAME(ctx context.Context, host string) (string, error) {
14 args := r.Called(ctx, host)
15 c := args.String(0)
16 e := args.Error(1)
17 if e != nil {
18 return "", e
19 }
20 return c, nil
21}