| Total Lines | 11 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package srv |
||
| 2 | |||
| 3 | import ( |
||
| 4 | "encoding/json" |
||
| 5 | "net/http" |
||
| 6 | ) |
||
| 7 | |||
| 8 | func RespondOK(data any, w http.ResponseWriter, _ *http.Request) { |
||
| 9 | w.Header().Set("Content-Type", "application/json; charset=utf-8") |
||
| 10 | w.WriteHeader(http.StatusOK) |
||
| 11 | _ = json.NewEncoder(w).Encode(data) |
||
| 12 | } |
||
| 13 |