-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server/v2/store): fix store server flags
- Loading branch information
1 parent
c0eced8
commit 5360700
Showing
3 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
package store | ||
|
||
const ( | ||
FlagAppDBBackend = "app-db-backend" | ||
FlagKeepRecent = "keep-recent" | ||
FlagInterval = "interval" | ||
import "fmt" | ||
|
||
// start flags are prefixed with the server name | ||
// as the config in prefixed with the server name | ||
// this allows viper to properly bind the flags | ||
func prefix(f string) string { | ||
return fmt.Sprintf("%s.%s", ServerName, f) | ||
} | ||
|
||
var ( | ||
FlagAppDBBackend = prefix("app-db-backend") | ||
FlagKeepRecent = prefix("keep-recent") | ||
FlagInterval = prefix("interval") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters