mirror of
https://github.com/Jguer/yay.git
synced 2024-11-07 17:47:21 +01:00
f8e7891b0b
* refactor(vcs): remove context passing mutex from VCS interface * simplify devel upgrade gather * update vcs upgrade tests * remove unused mock
31 lines
490 B
Go
31 lines
490 B
Go
package vcs
|
|
|
|
import (
|
|
"context"
|
|
|
|
gosrc "github.com/Morganamilo/go-srcinfo"
|
|
)
|
|
|
|
type Mock struct {
|
|
OriginsByPackage map[string]OriginInfoByURL
|
|
ToUpgradeReturn []string
|
|
}
|
|
|
|
func (m *Mock) ToUpgrade(ctx context.Context) []string {
|
|
return m.ToUpgradeReturn
|
|
}
|
|
|
|
func (m *Mock) Update(ctx context.Context, pkgName string, sources []gosrc.ArchString) {
|
|
}
|
|
|
|
func (m *Mock) Save() error {
|
|
return nil
|
|
}
|
|
|
|
func (m *Mock) RemovePackage(pkgs []string) {
|
|
}
|
|
|
|
func (m *Mock) Load() error {
|
|
return nil
|
|
}
|