jpictl: refactor zones loading

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-08-25 21:31:15 +01:00
parent 2043708949
commit 26c49dff72
3 changed files with 9 additions and 6 deletions
+1 -3
View File
@@ -4,8 +4,6 @@ import (
"os"
"github.com/spf13/cobra"
"git.jpi.io/amery/jpictl/pkg/zones"
)
// Command
@@ -13,7 +11,7 @@ var envCmd = &cobra.Command{
Use: "env",
Short: "generates environment variables for shell scripts",
RunE: func(_ *cobra.Command, _ []string) error {
m, err := zones.New(cfg.Base, cfg.Domain)
m, err := cfg.LoadZones()
if err != nil {
return err
}