Skip to content

Commit

Permalink
style: fix linting warning
Browse files Browse the repository at this point in the history
  • Loading branch information
DOO-DEV committed Nov 26, 2023
1 parent a8dfb9d commit 8b077d5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions config/loader.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package config

import (
"log"
"strings"

"github.com/knadh/koanf"
"github.com/knadh/koanf/parsers/yaml"
"github.com/knadh/koanf/providers/env"
"github.com/knadh/koanf/providers/file"
"github.com/knadh/koanf/providers/structs"
"log"
"strings"
)

const (
@@ -17,7 +18,7 @@ const (
defaultYamlFilePath = "config.yml"
)

var c *Config
var c Config

type Option struct {
Prefix string
@@ -58,11 +59,11 @@ func init() {
}
}

func C() *Config {
func C() Config {
return c
}

func New(opt Option) *Config {
func New(opt Option) Config {
k := koanf.New(opt.Separator)

if err := k.Load(structs.Provider(Default(), "koanf"), nil); err != nil {

0 comments on commit 8b077d5

Please sign in to comment.