refactor: move app listing back to common
Without this, we'd need to duplicate some logic or make it more complex via a plugin trigger.
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"text/template"
|
||||
|
||||
appjson "github.com/dokku/dokku/plugins/app-json"
|
||||
apps "github.com/dokku/dokku/plugins/apps"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
|
||||
cronparser "github.com/robfig/cron/v3"
|
||||
@@ -100,7 +99,7 @@ func deleteCrontab() error {
|
||||
}
|
||||
|
||||
func writeCronEntries() error {
|
||||
apps, _ := apps.DokkuApps()
|
||||
apps, _ := common.DokkuApps()
|
||||
commands := []templateCommand{}
|
||||
for _, appName := range apps {
|
||||
scheduler := common.GetAppScheduler(appName)
|
||||
|
||||
@@ -3,7 +3,6 @@ package cron
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/dokku/dokku/plugins/apps"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
"github.com/ryanuber/columnize"
|
||||
)
|
||||
@@ -32,7 +31,7 @@ func CommandList(appName string) error {
|
||||
// CommandReport displays a cron report for one or more apps
|
||||
func CommandReport(appName string, format string, infoFlag string) error {
|
||||
if len(appName) == 0 {
|
||||
apps, err := apps.DokkuApps()
|
||||
apps, err := common.DokkuApps()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user