We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 526c678 commit a0d06f3Copy full SHA for a0d06f3
infra/conf/common.go
@@ -45,6 +45,9 @@ func (v *Address) UnmarshalJSON(data []byte) error {
45
if err := json.Unmarshal(data, &rawStr); err != nil {
46
return newError("invalid address: ", string(data)).Base(err)
47
}
48
+ if strings.HasPrefix(rawStr, "env:") {
49
+ rawStr = os.Getenv(rawStr[4:])
50
+ }
51
v.Address = net.ParseAddress(rawStr)
52
53
return nil
@@ -115,8 +118,7 @@ func parseIntPort(data []byte) (net.Port, error) {
115
118
116
119
func parseStringPort(s string) (net.Port, net.Port, error) {
117
120
if strings.HasPrefix(s, "env:") {
- s = s[4:]
- s = os.Getenv(s)
121
+ s = os.Getenv(s[4:])
122
123
124
pair := strings.SplitN(s, "-", 2)
0 commit comments