Use cobra (#234)

switch to cobra

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-07-19 21:06:18 +09:00
committed by GitHub
parent 35453566df
commit 85ade797ab
44 changed files with 2144 additions and 831 deletions
+2 -2
View File
@@ -2059,7 +2059,7 @@ func (c context) wrapErrs(errs ...error) error {
return nil
}
func (a *App) ShowCacheDir(c ListConfigProvider) error {
func (a *App) ShowCacheDir(c CacheConfigProvider) error {
fmt.Printf("Cache directory: %s\n", remote.CacheDir())
if !directoryExistsAt(remote.CacheDir()) {
@@ -2076,7 +2076,7 @@ func (a *App) ShowCacheDir(c ListConfigProvider) error {
return nil
}
func (a *App) CleanCacheDir(c ListConfigProvider) error {
func (a *App) CleanCacheDir(c CacheConfigProvider) error {
if !directoryExistsAt(remote.CacheDir()) {
return nil
}
+2
View File
@@ -232,3 +232,5 @@ type interactive interface {
type ListConfigProvider interface {
Output() string
}
type CacheConfigProvider interface{}