api: use fmt.Fprint/Fprintln
Honestly I didn't know it existed at the time of writing gtranslate :)
This commit is contained in:
parent
3f6bdee18d
commit
54be24d1a5
3
api.go
3
api.go
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,6 +29,6 @@ func CreateApiHandler(settings *TranslateSettings) func(w http.ResponseWriter, r
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Write([]byte(translation))
|
fmt.Fprint(w, translation)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue