Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c8e299c

Browse files
authored
feat: Support config files with viper (#4558)
1 parent 2c47cda commit c8e299c

35 files changed

+922
-1091
lines changed

cli/config/file.go

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ import (
66
"path/filepath"
77
)
88

9+
const (
10+
FlagName = "global-config"
11+
)
12+
913
// Root represents the configuration directory.
1014
type Root string
1115

@@ -42,6 +46,10 @@ func (r Root) PostgresPort() File {
4246
return File(filepath.Join(r.PostgresPath(), "port"))
4347
}
4448

49+
func (r Root) DeploymentConfigPath() string {
50+
return filepath.Join(string(r), "server.yaml")
51+
}
52+
4553
// File provides convenience methods for interacting with *os.File.
4654
type File string
4755

0 commit comments

Comments
 (0)