mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 17:47:21 +01:00
f1d086df1d
* use updated aur client * add logger to rpc client * update go.mod
22 lines
340 B
Go
22 lines
340 B
Go
package mock
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/Jguer/aur"
|
|
)
|
|
|
|
type GetFunc func(ctx context.Context, query *aur.Query) ([]aur.Pkg, error)
|
|
|
|
type MockAUR struct {
|
|
GetFn GetFunc
|
|
}
|
|
|
|
func (m *MockAUR) Get(ctx context.Context, query *aur.Query) ([]aur.Pkg, error) {
|
|
if m.GetFn != nil {
|
|
return m.GetFn(ctx, query)
|
|
}
|
|
|
|
panic("implement me")
|
|
}
|