Skip to content

Revert "Revert "feat: Support config files with viper"" #4693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "Revert "feat: Support config files with viper (#4558)" (#4692)"
This reverts commit a2fb444.
  • Loading branch information
f0ssel authored Oct 21, 2022
commit 3e79fad1d8ab4374e01feacb41ed35578dd7e306
8 changes: 8 additions & 0 deletions cli/config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import (
"path/filepath"
)

const (
FlagName = "global-config"
)

// Root represents the configuration directory.
type Root string

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

func (r Root) DeploymentConfigPath() string {
return filepath.Join(string(r), "server.yaml")
}

// File provides convenience methods for interacting with *os.File.
type File string

Expand Down
Loading