14 lines
217 B
Go
14 lines
217 B
Go
package magic
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
)
|
|
|
|
type Map map[string]any
|
|
|
|
func (m Map) RespondWriter(w http.ResponseWriter) {
|
|
w.Header().Set("Content-Type", "application/json")
|
|
json.NewEncoder(w).Encode(m)
|
|
}
|