Skip to content

Commit

Permalink
chore(go): run gofumpt
Browse files Browse the repository at this point in the history
  • Loading branch information
FalcoSuessgott committed Apr 26, 2024
1 parent 3a7335e commit de5d811
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 26 deletions.
3 changes: 1 addition & 2 deletions cmd/akamai/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"fmt"
"os"

"github.com/rs/zerolog/log"
"github.com/kubefirst/kubefirst/internal/catalog"
"github.com/kubefirst/kubefirst/internal/cluster"
"github.com/kubefirst/kubefirst/internal/gitShim"
Expand All @@ -20,6 +19,7 @@ import (
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -49,7 +49,6 @@ func createAkamai(cmd *cobra.Command, args []string) error {
utilities.CreateK1ClusterDirectory(clusterNameFlag)

gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup)

if err != nil {
progress.Error(err.Error())
return nil
Expand Down
1 change: 0 additions & 1 deletion cmd/aws/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ func Destroy() *cobra.Command {
}

return destroyCmd

}

func Quota() *cobra.Command {
Expand Down
2 changes: 0 additions & 2 deletions cmd/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func createAws(cmd *cobra.Command, args []string) error {
Config: awsinternal.NewAwsV2(cloudRegionFlag),
}
creds, err := awsClient.Config.Credentials.Retrieve(aws.BackgroundContext())

if err != nil {
progress.Error(err.Error())
return nil
Expand All @@ -79,7 +78,6 @@ func createAws(cmd *cobra.Command, args []string) error {
}

gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup)

if err != nil {
progress.Error(err.Error())
return nil
Expand Down
3 changes: 1 addition & 2 deletions cmd/aws/quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func printAwsQuotaWarning(messageHeader string, output map[string][]awsinternal.

// Write to logs, but also output to stdout
return createAwsQuotaWarning.String()

}

// evalAwsQuota provides an interface to the command-line
Expand All @@ -53,7 +52,7 @@ func evalAwsQuota(cmd *cobra.Command, args []string) error {
return err
}

var messageHeader = fmt.Sprintf(
messageHeader := fmt.Sprintf(
"AWS Quota Health\nRegion: %s\n\nIf you encounter issues deploying your kubefirst cluster, check these quotas and determine if you need to request a limit increase.",
cloudRegionFlag,
)
Expand Down
1 change: 0 additions & 1 deletion cmd/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func createCivo(cmd *cobra.Command, args []string) error {
utilities.CreateK1ClusterDirectory(clusterNameFlag)

gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup)

if err != nil {
progress.Error(err.Error())
return nil
Expand Down
3 changes: 1 addition & 2 deletions cmd/civo/quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func returnCivoQuotaEvaluation(cloudRegion string) (string, int, int, error) {
}

// Parse the entire message
var messageHeader = fmt.Sprintf("Civo Quota Health\nRegion: %s\n\nNote that if any of these are approaching their limits, you may want to increase them.", cloudRegion)
messageHeader := fmt.Sprintf("Civo Quota Health\nRegion: %s\n\nNote that if any of these are approaching their limits, you may want to increase them.", cloudRegion)
sort.Strings(output)
result := printCivoQuotaWarning(messageHeader, output)

Expand Down Expand Up @@ -164,7 +164,6 @@ func printCivoQuotaWarning(messageHeader string, output []string) string {

// Write to logs, but also output to stdout
return createCivoQuotaWarning.String()

}

// evalCivoQuota provides an interface to the command-line
Expand Down
1 change: 0 additions & 1 deletion cmd/digitalocean/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/kubefirst/kubefirst-api/pkg/constants"
"github.com/kubefirst/kubefirst/internal/common"
"github.com/kubefirst/kubefirst/internal/progress"

"github.com/spf13/cobra"
)

Expand Down
1 change: 0 additions & 1 deletion cmd/digitalocean/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func createDigitalocean(cmd *cobra.Command, args []string) error {
utilities.CreateK1ClusterDirectory(clusterNameFlag)

gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup)

if err != nil {
progress.Error(err.Error())
return nil
Expand Down
1 change: 0 additions & 1 deletion cmd/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ var infoCmd = &cobra.Command{
Short: "provides general Kubefirst setup data",
Long: `Provides machine data, files and folders paths`,
Run: func(cmd *cobra.Command, args []string) {

config := configs.ReadConfig()

content := `
Expand Down
3 changes: 1 addition & 2 deletions cmd/k3s/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ package k3s
import (
"fmt"

"github.com/rs/zerolog/log"

"github.com/kubefirst/kubefirst/internal/catalog"
"github.com/kubefirst/kubefirst/internal/cluster"
"github.com/kubefirst/kubefirst/internal/gitShim"
Expand All @@ -20,6 +18,7 @@ import (
"github.com/kubefirst/kubefirst/internal/utilities"
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
_ "k8s.io/client-go/plugin/pkg/client/auth"
Expand Down
6 changes: 2 additions & 4 deletions cmd/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ import (
"github.com/spf13/cobra"
)

var (
// additionalHelmFlags can optionally pass user-supplied flags to helm
additionalHelmFlags []string
)
// additionalHelmFlags can optionally pass user-supplied flags to helm
var additionalHelmFlags []string

func LaunchCommand() *cobra.Command {
launchCommand := &cobra.Command{
Expand Down
6 changes: 2 additions & 4 deletions cmd/letsencrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ import (
"github.com/spf13/cobra"
)

var (
// Certificate check
domainNameFlag string
)
// Certificate check
var domainNameFlag string

func LetsEncryptCommand() *cobra.Command {
letsEncryptCommand := &cobra.Command{
Expand Down
1 change: 0 additions & 1 deletion cmd/vultr/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ var (
)

func NewCommand() *cobra.Command {

vultrCmd := &cobra.Command{
Use: "vultr",
Short: "kubefirst Vultr installation",
Expand Down
2 changes: 0 additions & 2 deletions cmd/vultr/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/kubefirst/runtime/pkg"
internalssh "github.com/kubefirst/runtime/pkg/ssh"
"github.com/rs/zerolog/log"

"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down Expand Up @@ -56,7 +55,6 @@ func createVultr(cmd *cobra.Command, args []string) error {
utilities.CreateK1ClusterDirectory(clusterNameFlag)

gitAuth, err := gitShim.ValidateGitCredentials(cliFlags.GitProvider, cliFlags.GithubOrg, cliFlags.GitlabGroup)

if err != nil {
progress.Error(err.Error())
return nil
Expand Down

0 comments on commit de5d811

Please sign in to comment.