func (h *proxyHandler) GETInfo(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()
	path, ver := parsePathVersion(r)

	mod, err := h.uc.LoadModule(ctx, path)
	if err != nil {
		respondError(w, statusCode(err), err)
		return
	}
	if !mod.HasVersion(ver) {
		respondError(w, statusCode(domain.ErrNotFound), fmt.Errorf("%w: \"%s\": unknown revision %s", domain.ErrNotFound, path, ver))
		return
	}

	i, err := json.Marshal(InfoResponse{Version: ver})
	if err != nil {
		respondError(w, statusCode(err), err)
		return
	}

	fmt.Fprintln(w, string(i))
}
// GETInfo handles info queries.
GETInfo handles info queries.
// GETInfo handles info queries .
func (h *proxyHandler) GETInfo(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()
	path, ver := parsePathVersion(r)
	mod, err := h.uc.LoadModule(ctx, path)
	if err != nil {
		respondError(w, statusCode(err), err)
		return
	}
	if !mod.HasVersion(ver) {
		respondError(w, statusCode(domain.ErrNotFound), fmt.Errorf("%w: \"%s\": unknown revision %s", domain.ErrNotFound, path, ver))
		return
	}
	i, err := json.Marshal(InfoResponse{Version: ver})
	if err != nil {
		respondError(w, statusCode(err), err)
		return
	}
	fmt.Fprintln(w, string(i))
}
func ( h * proxyHandler ) GETInfo ( w http . ResponseWriter , r * http . Request ) { ctx := r . Context ( ) path , ver := parsePathVersion ( r ) mod , err := h . uc . LoadModule ( ctx , path ) if err != nil { respondError ( w , statusCode ( err ) , err ) return } if ! mod . HasVersion ( ver ) { respondError ( w , statusCode ( domain . ErrNotFound ) , fmt . Errorf ( " \" \" " , domain . ErrNotFound , path , ver ) ) return } i , err := json . Marshal ( InfoResponse { Version : ver } ) if err != nil { respondError ( w , statusCode ( err ) , err ) return } fmt . Fprintln ( w , string ( i ) ) }
GETInfo handles info queries.
GETInfo handles info queries .