<commit_before>package main

import (
	"net/http"

	"github.com/Felamande/filesync/syncer"
)

func main() {
	syncer.New().Run()
	http.ListenAndServe(":8070", nil)
}<commit_msg>Test http server powered by martini<commit_after>package main

import (
	"net/http"

	"github.com/Felamande/filesync/log"
	"github.com/go-martini/martini"

	"github.com/Felamande/filesync/syncer"
)

func main() {
	s := syncer.New()
	m := martini.Classic()
	l := log.NewFileLogger("./.log/http.log")
	m.Map(s)
	m.Map(l)
	m.Post("/new", NewPair)
	m.Get("/new", HelloNewPair)
	go s.Run()
	http.ListenAndServe(":20000", m)

}

func NewPair(logger *log.FileLogger, s *syncer.Syncer, w http.ResponseWriter, r *http.Request) int {
	r.ParseForm()
	_, lExist := r.Form["left"]
	_, rExist := r.Form["right"]

	if !lExist || !rExist {
		return 400

	}
	return 200

}

func HelloNewPair() string {
	return "Hello"
}
{'fraction_non_alphanumeric': 0.17974971558589306, 'fraction_numerical': 0.017064846416382253, 'mean_word_length': 4.146198830409356, 'pattern_counts': {'":': 2, '<': 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': '1702823', 'n_tokens_mistral': 389, 'n_tokens_neox': 367, 'n_words': 67}