Skip to content

Commit 9b92d61

Browse files
committed
refactor: use internal/cli for CLI configuration loading and types instead of internal/config
1 parent 06f1b85 commit 9b92d61

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cmd/devenv/auth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os"
66

77
"github.com/nauticalab/devenv-engine/internal/cli"
8-
"github.com/nauticalab/devenv-engine/internal/config"
98
"github.com/spf13/cobra"
109
)
1110

@@ -21,7 +20,7 @@ var authListCmd = &cobra.Command{
2120
Long: `Display the current authentication information, including the authenticated user and their developer identity.`,
2221
Run: func(cmd *cobra.Command, args []string) {
2322
// Load configuration
24-
cfg, err := config.LoadCLIConfig()
23+
cfg, err := cli.LoadCLIConfig()
2524
if err != nil {
2625
fmt.Fprintf(os.Stderr, "Error loading config: %v\n", err)
2726
os.Exit(1)

internal/config/cli_config.go renamed to internal/cli/cli_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package config
1+
package cli
22

33
import (
44
"fmt"

internal/cli/client/pods.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
"text/tabwriter"
88

9-
"github.com/nauticalab/devenv-engine/internal/config"
9+
"github.com/nauticalab/devenv-engine/internal/cli"
1010
"github.com/nauticalab/devenv-engine/internal/manager/api"
1111
"github.com/nauticalab/devenv-engine/internal/manager/auth"
1212
"github.com/nauticalab/devenv-engine/internal/manager/client"
@@ -95,9 +95,9 @@ func printPodsTable(pods []api.Pod) {
9595
}
9696

9797
// LoadConfig loads the CLI configuration and applies overrides
98-
func LoadConfig(managerURLOverride string) (*config.CLIConfig, error) {
98+
func LoadConfig(managerURLOverride string) (*cli.CLIConfig, error) {
9999
// Load configuration
100-
cfg, err := config.LoadCLIConfig()
100+
cfg, err := cli.LoadCLIConfig()
101101
if err != nil {
102102
return nil, fmt.Errorf("failed to load configuration: %w", err)
103103
}

0 commit comments

Comments
 (0)