Skip to content

Commit 455804d

Browse files
committed
chore: lint fixes
1 parent 411f5bd commit 455804d

2 files changed

Lines changed: 17 additions & 27 deletions

File tree

internal/auth0/quickstart.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ import (
1414
"github.com/auth0/go-auth0/management"
1515

1616
"github.com/auth0/auth0-cli/internal/buildinfo"
17-
// "github.com/auth0/auth0-cli/internal/prompt"
18-
// "github.com/auth0/auth0-cli/internal/prompt"
19-
2017
"github.com/auth0/auth0-cli/internal/utils"
2118
)
2219

@@ -202,7 +199,7 @@ var QuickstartConfigs = map[string]AppConfig{
202199

203200
// ==========================================
204201
// Single Page Applications (SPA)
205-
// ==========================================
202+
// ==========================================.
206203
"spa:react:vite": {
207204
EnvValues: map[string]string{
208205
"VITE_AUTH0_DOMAIN": DetectionSub,
@@ -290,7 +287,7 @@ var QuickstartConfigs = map[string]AppConfig{
290287

291288
// ==========================================
292289
// Regular Web Applications
293-
// ==========================================
290+
// ==========================================.
294291
"regular:nextjs:none": {
295292
EnvValues: map[string]string{
296293
"AUTH0_DOMAIN": DetectionSub,

internal/cli/quickstarts.go

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ import (
1212
"strconv"
1313
"strings"
1414

15-
"github.com/auth0/go-auth0/management"
16-
"github.com/spf13/cobra"
17-
1815
"github.com/auth0/auth0-cli/internal/ansi"
1916
"github.com/auth0/auth0-cli/internal/auth0"
2017
"github.com/auth0/auth0-cli/internal/prompt"
18+
"github.com/auth0/go-auth0/management"
19+
"github.com/spf13/cobra"
2120
)
2221

2322
// QuickStart app types and defaults.
@@ -724,27 +723,23 @@ func setupQuickstartCmdExperimental(cli *cli) *cobra.Command {
724723

725724
if err != nil {
726725
return fmt.Errorf("failed to create application: %w", err)
726+
}
727+
728+
if client.GetAppType() == "resource_server" {
729+
printClientDetails(client, inputs.Port, "", true)
727730
} else {
728-
if client.GetAppType() == "resource_server" {
729-
printClientDetails(client, inputs.Port, "", true)
730-
} else {
731-
// cli.renderer.Infof("Application created successfully with Client ID: %s", client.GetClientID())
732-
tenant, err := cli.Config.GetTenant(cli.tenant)
733-
if err != nil {
734-
return fmt.Errorf("failed to get tenant: %w", err)
735-
}
736-
// Generate the .env file
737-
envFileName, _, err := GenerateAndWriteQuickstartConfig(&config.Strategy, config.EnvValues, tenant.Domain, client)
738-
if err != nil {
739-
return fmt.Errorf("failed to generate .env file: %w", err)
740-
}
741-
// cli.renderer.Infof("%s file created successfully with your Auth0 configuration\n", envFileName)
742-
printClientDetails(client, inputs.Port, envFileName, false)
731+
tenant, err := cli.Config.GetTenant(cli.tenant)
732+
if err != nil {
733+
return fmt.Errorf("failed to get tenant: %w", err)
734+
}
735+
// Generate the .env file
736+
envFileName, _, err := GenerateAndWriteQuickstartConfig(&config.Strategy, config.EnvValues, tenant.Domain, client)
737+
if err != nil {
738+
return fmt.Errorf("failed to generate .env file: %w", err)
743739
}
740+
printClientDetails(client, inputs.Port, envFileName, false)
744741
}
745-
746742
}
747-
748743
return nil
749744
},
750745
}
@@ -841,7 +836,6 @@ func getQuickstartConfigKey(inputs struct {
841836
OfflineAccess bool
842837
MetaData map[string]interface{}
843838
}, error) {
844-
845839
// Prompt for target resource(s) when neither flag is provided.
846840
if !inputs.App && !inputs.API {
847841
var selections []string
@@ -875,7 +869,6 @@ func getQuickstartConfigKey(inputs struct {
875869
// Prompt for --type if not provided
876870
if inputs.Type == "" {
877871
types := []string{"spa", "regular", "native", "m2m"}
878-
// name, message, help, options, defaultValue, required
879872
q := prompt.SelectInput("type", "Select the application type", "", types, "m2m", true)
880873
if err := prompt.AskOne(q, &inputs.Type); err != nil {
881874
return "", inputs, fmt.Errorf("failed to select application type: %v", err)

0 commit comments

Comments
 (0)