mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 17:47:21 +01:00
28d90c981e
* make config into parameter * test(new engine): local install test * test(keys): fix test keys * complete integration test for local install * add simple mising mechanism
23 lines
391 B
Go
23 lines
391 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")
|
|
}
|