package router import ( "encoding/json" "net/http" ) func SendResponse(w http.ResponseWriter, status int, response interface{}) { w.Header().Set("Content-Type", "application/json") w.WriteHeader(status) json.NewEncoder(w).Encode(response) }