refactor: move apps listing from common plugin to apps plugin
This helps centralize app-related listing fetching.
This commit is contained in:
@@ -3,11 +3,14 @@ module github.com/dokku/dokku/plugins/scheduler
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/dokku/dokku/plugins/apps v0.0.0-00010101000000-000000000000
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/dokku/dokku/plugins/config 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
|
||||
|
||||
replace github.com/dokku/dokku/plugins/config => ../config
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package scheduler
|
||||
|
||||
import (
|
||||
"github.com/dokku/dokku/plugins/apps"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// CommandReport displays a scheduler 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
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package scheduler
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dokku/dokku/plugins/apps"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
"github.com/dokku/dokku/plugins/config"
|
||||
)
|
||||
@@ -31,7 +32,7 @@ func TriggerInstall() error {
|
||||
return fmt.Errorf("Unable to install the scheduler plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
apps, err := common.DokkuApps()
|
||||
apps, err := apps.DokkuApps()
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user