refactor: move apps listing from common plugin to apps plugin

This helps centralize app-related listing fetching.
This commit is contained in:
Jose Diaz-Gonzalez
2021-11-12 15:54:08 -05:00
parent 9d8de8a9db
commit 62a3eff5bb
45 changed files with 136 additions and 55 deletions

View File

@@ -4,8 +4,11 @@ go 1.16
require (
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27
github.com/dokku/dokku/plugins/apps v0.0.0-00010101000000-000000000000
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
github.com/spf13/pflag v1.0.5
)
replace github.com/dokku/dokku/plugins/apps => ../apps
replace github.com/dokku/dokku/plugins/common => ../common

View File

@@ -7,6 +7,7 @@ import (
"os"
"strings"
"github.com/dokku/dokku/plugins/apps"
"github.com/dokku/dokku/plugins/common"
)
@@ -55,7 +56,7 @@ func CommandLogin(server string, username string, password string, passwordStdin
// CommandReport displays a registry report for one or more apps
func CommandReport(appName string, format string, infoFlag string) error {
if len(appName) == 0 {
apps, err := common.DokkuApps()
apps, err := apps.DokkuApps()
if err != nil {
return err
}