Skip to content

Commit

Permalink
fix: load config error
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Jan 14, 2025
1 parent 1118964 commit 1cc3d4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/configutil/once.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ var (
// configInfo is the config.json data
configInfo *config.Config
configOnce sync.Once
err error
)

// LoadConfigOnce returns the previously read config file.
// If previous config file does not exist, it reads the config from file
// or return a default config if not found.
// The returned config is only suitable for read only scenarios for short-lived processes.
func LoadConfigOnce() (*config.Config, error) {
var err error
configOnce.Do(func() {
configInfo, err = config.LoadConfig()
if err != nil {
Expand Down

0 comments on commit 1cc3d4c

Please sign in to comment.