<commit_before>package horo

import (
	"encoding/json"
	"net/http"

	"github.com/julienschmidt/httprouter"
	"golang.org/x/net/context"
)

type (
	horoCtx struct {
		context.Context

		w  ResponseWriter
		r  *http.Request
		ps httprouter.Params
	}

	ctxkey struct {
		name string
	}
)

var (
	ctxKey = &ctxkey{"horo ctx"}
)

func fromCtx(c context.Context) (ctx *horoCtx) {
	ctx, _ = c.Value(ctxKey).(*horoCtx)
	return
}

func (c *horoCtx) Value(key interface{}) interface{} {
	if key == ctxKey {
		return c
	}
	return c.Context.Value(key)
}

func (c *horoCtx) Reset(rw http.ResponseWriter, r *http.Request, ps httprouter.Params) {
	c.w.(*response).Reset(rw)
	c.r = r
	c.ps = ps
}

// Param returns url param.
func Param(c context.Context, name string) string {
	if c := fromCtx(c); c != nil {
		return c.ps.ByName(name)
	}
	return ""
}

// NoContent send no body.<commit_msg>Minor fix<commit_after>package horo

import (
	"encoding/json"
	"net/http"

	"github.com/julienschmidt/httprouter"
	"golang.org/x/net/context"
)

type (
	horoCtx struct {
		context.Context

		w  ResponseWriter
		r  *http.Request
		ps httprouter.Params
	}

	ctxkey struct {
		name string
	}
)

var (
	ctxKey = &ctxkey{"horo ctx"}
)

func fromCtx(c context.Context) (ctx *horoCtx) {
	ctx, _ = c.Value(ctxKey).(*horoCtx)
	return
}

func (c *horoCtx) Value(key interface{}) interface{} {
	if key == ctxKey {
		return c
	}
	return c.Context.Value(key)
}

func (c *horoCtx) Reset(rw http.ResponseWriter, r *http.Request, ps httprouter.Params) {
	c.w.Reset(rw)
	c.r = r
	c.ps = ps
}

// Param returns url param.
func Param(c context.Context, name string) string {
	if c := fromCtx(c); c != nil {
		return c.ps.ByName(name)
	}
	return ""
}

// NoContent send no body.
{'fraction_non_alphanumeric': 0.1453287197231834, 'fraction_numerical': 0.0, 'mean_word_length': 3.4373401534526855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1482793', 'n_tokens_mistral': 715, 'n_tokens_neox': 716, 'n_words': 164}