Added golang CI lint Reference issue: https://github.com/uber-go/zap/issues/880 Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
21 lines
393 B
Go
21 lines
393 B
Go
package main
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
// Handler is the entry point for this fission function
|
|
func Handler(w http.ResponseWriter, r *http.Request) { //nolint:golint,unused,deadcode
|
|
bytes, err := ioutil.ReadAll(r.Body)
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
return
|
|
}
|
|
_, err = w.Write(bytes)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|