diff --git a/main.go b/main.go index fc3cb3d..247e736 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" "os" + "sort" "strconv" "strings" @@ -84,8 +85,8 @@ func main() { fmt.Fprint(w, os.Getenv(keys[0])) return } - envs := []string{} - envs = append(envs, os.Environ()...) + envs := os.Environ() + sort.Strings(envs) fmt.Fprint(w, strings.Join(envs, "\n")) })