summaryrefslogtreecommitdiff
path: root/pkg/env
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/env')
-rw-r--r--pkg/env/env.go2
-rw-r--r--pkg/env/env_unix.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/pkg/env/env.go b/pkg/env/env.go
index ecd2d62a5..5989d0da5 100644
--- a/pkg/env/env.go
+++ b/pkg/env/env.go
@@ -26,7 +26,7 @@ func DefaultEnvVariables() map[string]string {
// Slice transforms the specified map of environment variables into a
// slice. If a value is non-empty, the key and value are joined with '='.
func Slice(m map[string]string) []string {
- env := make([]string, len(m))
+ env := make([]string, 0, len(m))
for k, v := range m {
var s string
if len(v) > 0 {
diff --git a/pkg/env/env_unix.go b/pkg/env/env_unix.go
index 16061a700..690078f33 100644
--- a/pkg/env/env_unix.go
+++ b/pkg/env/env_unix.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package env