yay/pkg/dep/mock/aur.go
Jo 9be51052f7
update deps (#1868)
* update deps

* align struct
2022-12-29 18:42:43 +00:00

23 lines
389 B
Go

package mock
import (
"context"
"github.com/Jguer/aur"
"github.com/Jguer/aur/metadata"
)
type GetFunc func(ctx context.Context, query *metadata.AURQuery) ([]aur.Pkg, error)
type MockAUR struct {
GetFn GetFunc
}
func (m *MockAUR) Get(ctx context.Context, query *metadata.AURQuery) ([]aur.Pkg, error) {
if m.GetFn != nil {
return m.GetFn(ctx, query)
}
panic("implement me")
}