mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Make api config key a const
This commit is contained in:
parent
61e689a513
commit
74736fafa8
1 changed files with 6 additions and 1 deletions
|
@ -7,6 +7,11 @@ import (
|
|||
"github.com/safing/portbase/log"
|
||||
)
|
||||
|
||||
// Config Keys
|
||||
const (
|
||||
CfgDefaultListenAddressKey = "api/listenAddress"
|
||||
)
|
||||
|
||||
var (
|
||||
listenAddressFlag string
|
||||
listenAddressConfig config.StringOption
|
||||
|
@ -35,7 +40,7 @@ func getDefaultListenAddress() string {
|
|||
func registerConfig() error {
|
||||
err := config.Register(&config.Option{
|
||||
Name: "API Address",
|
||||
Key: "api/listenAddress",
|
||||
Key: CfgDefaultListenAddressKey,
|
||||
Description: "Define on which IP and port the API should listen on.",
|
||||
Order: 128,
|
||||
OptType: config.OptTypeString,
|
||||
|
|
Loading…
Add table
Reference in a new issue