Skip to content

Commit

Permalink
#117: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-glushko committed Feb 4, 2024
1 parent 1de351b commit dfde81c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/go-playground/validator/v10 v10.17.0
github.com/hertz-contrib/logger/zap v1.1.0
github.com/hertz-contrib/swagger v0.1.0
github.com/joho/godotenv v1.5.1
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.8.4
github.com/swaggo/files v1.0.1
Expand Down Expand Up @@ -38,7 +39,6 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
Expand Down
13 changes: 7 additions & 6 deletions pkg/cmd/cli.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package cmd

import (
"fmt"
"log"

"github.com/spf13/cobra"
"glide/pkg"
"glide/pkg/config"
"log"
)

var dotEnvFile string
var cfgFile string
var (
dotEnvFile string
cfgFile string
)

const Description = `
██████╗ ██╗ ██╗██████╗ ███████╗
Expand Down Expand Up @@ -45,11 +47,10 @@ func NewCLI() *cobra.Command {
if err != nil {
log.Println("⚠️failed to load dotenv file: ", err) // don't have an inited logger at this moment
} else {
log.Println(fmt.Sprintf("🔧dot env file loaded (%v)", dotEnvFile))
log.Printf("🔧dot env file loaded (%v)", dotEnvFile)
}

_, err = configProvider.Load(cfgFile)

if err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package config

import (
"fmt"
"github.com/joho/godotenv"
"os"
"path/filepath"
"reflect"
"strings"

"github.com/joho/godotenv"

"github.com/go-playground/validator/v10"

"gopkg.in/yaml.v3"
Expand Down

0 comments on commit dfde81c

Please sign in to comment.