diff options
author | Emile <hanemile@protonmail.com> | 2019-02-28 18:45:37 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-02-28 18:45:37 +0100 |
commit | e6c342f74aa4c4c7ef025f420a28c00a211cc1db (patch) | |
tree | 28e10af47b595058cdca0a62780d1b8b637aa672 | |
parent | b36847c031db55fe7a2cdf40112ad01c424355bd (diff) |
changed the method used for writing to the responseWriter
-rw-r--r-- | main.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/main.go b/main.go index 1020517..ab2e8d2 100644 --- a/main.go +++ b/main.go @@ -129,10 +129,9 @@ func generateHandler(w http.ResponseWriter, r *http.Request) { log.Printf("galaxy range: %f", galaxyRange) log.Printf("%v\n", result) - _, err := fmt.Fprintf(w, "%f, %f, %f\n", result.x, result.y, result.z) - if err != nil { - panic(err) - } + + log.SetOutput(w) + log.Printf("%f, %f, %f\n", result.x, result.y, result.z) } } |