<commit_before>package api

import (
	"fmt"
	"net/http"

	htr "github.com/julienschmidt/httprouter"

	"github.com/synapse-garden/mf-proto/db"
)

func Source(d db.DB) API {
	return func(r *htr.Router) error {
		r.GET("/source", handleSource)
		return nil
	}
}

func handleSource(w http.ResponseWriter, r *http.Request, ps htr.Params) {
	fmt.Fprint(w, `---     S Y N A P S E G A R D E N      ---
            MF-Proto v0.3.0  
         © SynapseGarden 2015
 Licensed under Affero GNU Public License
                version 3
https://github.com/synapse-garden/mf-proto
---                                    ---
`)
}<commit_msg>Move source text to const<commit_after>package api

import (
	"fmt"
	"net/http"

	htr "github.com/julienschmidt/httprouter"

	"github.com/synapse-garden/mf-proto/db"
)

const source = `---     S Y N A P S E G A R D E N      ---
            MF-Proto v0.3.0
         © SynapseGarden 2015
 Licensed under Affero GNU Public License
                version 3
https://github.com/synapse-garden/mf-proto
---                                    ---
`

func Source(d db.DB) API {
	return func(r *htr.Router) error {
		r.GET("/source", handleSource)
		return nil
	}
}

func handleSource(w http.ResponseWriter, r *http.Request, ps htr.Params) {
	fmt.Fprint(w, source)
}
{'fraction_non_alphanumeric': 0.12724434035909446, 'fraction_numerical': 0.01249024199843872, 'mean_word_length': 2.037914691943128, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3544798', 'n_tokens_mistral': 473, 'n_tokens_neox': 449, 'n_words': 117}