From 1b38687e2dc159b0a61e6994796a63d84a7096da Mon Sep 17 00:00:00 2001 From: Serge Smertin Date: Mon, 16 May 2022 12:50:50 +0200 Subject: [PATCH] more TODO's --- cmd/init/legacy-cli.go | 1 + cmd/init/prompt.go | 1 + cmd/launch/launch.go | 2 ++ project/config.go | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/init/legacy-cli.go b/cmd/init/legacy-cli.go index a76ff180..eaef664c 100644 --- a/cmd/init/legacy-cli.go +++ b/cmd/init/legacy-cli.go @@ -23,6 +23,7 @@ func loadCliProfiles() (profiles []Answer, err error) { // invalid profile continue } + // TODO: verify these tokens to work, becaus they may be expired profiles = append(profiles, Answer{ Value: v.Name(), Details: fmt.Sprintf(`Connecting to "%s" workspace`, host), diff --git a/cmd/init/prompt.go b/cmd/init/prompt.go index 86c43eeb..43d7815a 100644 --- a/cmd/init/prompt.go +++ b/cmd/init/prompt.go @@ -55,6 +55,7 @@ type Choice struct { } func (q Choice) Ask(res Results) (string, Answer, error) { + // TODO: validate and re-ask prompt := promptui.Select{ Label: q.Label, Items: q.Answers, diff --git a/cmd/launch/launch.go b/cmd/launch/launch.go index 6d45c9ca..b584ac42 100644 --- a/cmd/launch/launch.go +++ b/cmd/launch/launch.go @@ -30,5 +30,7 @@ var launchCmd = &cobra.Command{ } func init() { + // TODO: detect if we can skip registering + // launch command for DBSQL projects root.RootCmd.AddCommand(launchCmd) } diff --git a/project/config.go b/project/config.go index f654f1a5..8c9ab337 100644 --- a/project/config.go +++ b/project/config.go @@ -33,7 +33,7 @@ type Assertions struct { type Project struct { Name string `json:"name"` // or do default from folder name?.. - Profile string `json:"profile,omitempty"` + Profile string `json:"profile,omitempty"` // rename? Isolation Isolation `json:"isolation,omitempty"` // TODO: turn to pointer for the easy YAML marshalling