From 8904c87c6beb4f2b080bf4269fb211e6f2eea7f2 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Wed, 14 Aug 2019 14:06:28 +0300 Subject: Tests: goftm used for Go applications. --- test/go/command_line_arguments/app.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'test/go/command_line_arguments') diff --git a/test/go/command_line_arguments/app.go b/test/go/command_line_arguments/app.go index 228e07c0..234e565e 100644 --- a/test/go/command_line_arguments/app.go +++ b/test/go/command_line_arguments/app.go @@ -1,23 +1,23 @@ package main import ( - "io" - "os" - "fmt" - "strings" - "net/http" - "nginx/unit" + "fmt" + "io" + "net/http" + "nginx/unit" + "os" + "strings" ) func handler(w http.ResponseWriter, r *http.Request) { - args := strings.Join(os.Args[1:], ",") + args := strings.Join(os.Args[1:], ",") - w.Header().Add("X-Arg-0", fmt.Sprintf("%v", os.Args[0])) - w.Header().Add("Content-Length", fmt.Sprintf("%v", len(args))) - io.WriteString(w, args) + w.Header().Add("X-Arg-0", fmt.Sprintf("%v", os.Args[0])) + w.Header().Add("Content-Length", fmt.Sprintf("%v", len(args))) + io.WriteString(w, args) } func main() { - http.HandleFunc("/", handler) - unit.ListenAndServe(":7080", nil) + http.HandleFunc("/", handler) + unit.ListenAndServe(":7080", nil) } -- cgit