package handler import ( _ "embed" "net/http" ) //go:embed openapi.yaml var openapiYAML []byte func openapiHandler() http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/yaml; charset=utf-8") w.Header().Set("Cache-Control", "public, max-age=60") w.WriteHeader(http.StatusOK) _, _ = w.Write(openapiYAML) } }