* Updated all Go language dependencies to latest version available * Formatted all files as per gofmt * Update Golangci-lint version to 1.48.0 * Updated action version wherer application in Github workflows * Updated Kubernetes version to latest available * Remove "io/ioutil" references and replace with "io"/"os" Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
21 lines
382 B
Go
21 lines
382 B
Go
package main
|
|
|
|
import (
|
|
"io"
|
|
"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 := io.ReadAll(r.Body)
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
return
|
|
}
|
|
_, err = w.Write(bytes)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|