This commit is contained in:
2025-11-19 15:02:59 +00:00
parent 5ec97187e4
commit 20d0f5e43e
39 changed files with 10143 additions and 10094 deletions

View File

@@ -1,23 +1,23 @@
package handlers
import (
"encoding/json"
"net/http"
"time"
"github.com/gorilla/mux"
)
func muxVars(r *http.Request) map[string]string { return mux.Vars(r) }
func writeJSON(w http.ResponseWriter, status int, v interface{}) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(status)
_ = json.NewEncoder(w).Encode(v)
}
type metaEnvelope struct {
FetchedAt time.Time `json:"fetchedAt"`
APIVersion string `json:"apiVersion"`
ResponseTime int64 `json:"responseTime"`
}
package handlers
import (
"encoding/json"
"net/http"
"time"
"github.com/gorilla/mux"
)
func muxVars(r *http.Request) map[string]string { return mux.Vars(r) }
func writeJSON(w http.ResponseWriter, status int, v interface{}) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(status)
_ = json.NewEncoder(w).Encode(v)
}
type metaEnvelope struct {
FetchedAt time.Time `json:"fetchedAt"`
APIVersion string `json:"apiVersion"`
ResponseTime int64 `json:"responseTime"`
}