add list config file and relevant config in main config file. other minor changes
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed

This commit is contained in:
2024-08-28 15:06:25 -05:00
parent 8161aaa0a9
commit a300f696d3
14 changed files with 321 additions and 203 deletions

View File

@@ -197,6 +197,7 @@ func resolveDir(path string) (string, error) {
return path, nil
}
// loadEnv loads a .env file from the config file directory
func (opts *ConfigOpts) loadEnv() {
envFileInConfigDir := fmt.Sprintf("%s/.env", path.Dir(opts.ConfigFilePath))
var backyEnv map[string]string
@@ -208,6 +209,7 @@ func (opts *ConfigOpts) loadEnv() {
opts.backyEnv = backyEnv
}
// expandEnvVars expands environment variables with the env used in the config
func expandEnvVars(backyEnv map[string]string, envVars []string) {
env := func(name string) string {