From 8b077d50a4d8f72a82f17b057b16c426982eefcc Mon Sep 17 00:00:00 2001 From: DOO-DEV Date: Mon, 27 Nov 2023 00:40:09 +0330 Subject: [PATCH] style: fix linting warning --- config/loader.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/loader.go b/config/loader.go index 4c76f711..6a4199c8 100644 --- a/config/loader.go +++ b/config/loader.go @@ -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 {