github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/utils/config.go (about)

     1  package utils
     2  
     3  import (
     4  	"github.com/projecteru2/core/types"
     5  
     6  	"github.com/jinzhu/configor"
     7  )
     8  
     9  // LoadConfig load config from yaml
    10  func LoadConfig(configPath string) (types.Config, error) {
    11  	config := types.Config{}
    12  
    13  	return config, configor.Load(&config, configPath)
    14  }