Files
p/response.go

15 lines
233 B
Go
Raw Normal View History

2024-11-26 13:26:26 -06:00
package main
import (
"fmt"
"net/http"
)
type Response struct {
Message string `json:"message"`
}
func sendResponse(w http.ResponseWriter, msg string, args ...any) {
sendJSON(w, Response{Message: fmt.Sprintf(msg, args...)})
}