mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-22 07:57:34 +00:00
Allow WithEnv to be passed multiple times
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
d71aef3b98
commit
91ed6e2197
@ -79,13 +79,9 @@ func WithTLS() Option {
|
|||||||
|
|
||||||
func WithConfigEnv(configEnv map[string]string) Option {
|
func WithConfigEnv(configEnv map[string]string) Option {
|
||||||
return func(hsic *HeadscaleInContainer) {
|
return func(hsic *HeadscaleInContainer) {
|
||||||
env := []string{}
|
|
||||||
|
|
||||||
for key, value := range configEnv {
|
for key, value := range configEnv {
|
||||||
env = append(env, fmt.Sprintf("%s=%s", key, value))
|
hsic.env = append(hsic.env, fmt.Sprintf("%s=%s", key, value))
|
||||||
}
|
}
|
||||||
|
|
||||||
hsic.env = env
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user