<commit_before>//easycode.go serves a webpage useful for showing a demo of Cloud Foundry
package main

import (
	"net/http"
	"html/template"
	"log"
)

type Location struct {
    Name string
}

func check(function string, e error) {
	if e != nil {
		log.Fatal(function, e)
	}
}


func responseHandler(w http.ResponseWriter, r *http.Request) {
	location:=Location{Name: getName() }
	t,err:=template.ParseFiles("templates/index.tmpl")
	check("Parse template",err)
	t.Execute(w,location)
}

func getName() string{
	return "Philadelphia, PA"
}

func main() {
	http.HandleFunc("/",responseHandler)
	http.Handle("/images/",http.StripPrefix("/images/",http.FileServer(http.Dir("/home/vcap/app/images"))))
	http.Handle("/css/",http.StripPrefix("/css/",http.FileServer(http.Dir("/home/vcap/app/css"))))
	http.Handle("/fonts/",http.StripPrefix("/fonts/",http.FileServer(http.Dir("/home/vcap/app/fonts"))))
	http.Handle("/js/",http.StripPrefix("/js/",http.FileServer(http.Dir("/home/vcap/app/js"))))
	log.Fatal(http.ListenAndServe(":8080",nil))
}<commit_msg>Removed explicit paths to assets<commit_after>//easycode.go serves a webpage useful for showing a demo of Cloud Foundry
package main

import (
	"net/http"
	"html/template"
	"log"
)

type Location struct {
    Name string
}

func check(function string, e error) {
	if e != nil {
		log.Fatal(function, e)
	}
}


func responseHandler(w http.ResponseWriter, r *http.Request) {
	location:=Location{Name: getName() }
	t,err:=template.ParseFiles("templates/index.tmpl")
	check("Parse template",err)
	t.Execute(w,location)
}

func getName() string{
	return "Philadelphia, PA"
}

func main() {
	http.HandleFunc("/",responseHandler)
	http.Handle("/images/",http.FileServer(http.Dir("")))
	http.Handle("/css/",http.FileServer(http.Dir("")))
	http.Handle("/fonts/",http.FileServer(http.Dir("")))
	http.Handle("/js/",http.FileServer(http.Dir("")))
	log.Fatal(http.ListenAndServe(":8080",nil))
}
{'fraction_non_alphanumeric': 0.18785677218474311, 'fraction_numerical': 0.0041515308770108976, 'mean_word_length': 5.280130293159609, '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': '3460481', 'n_tokens_mistral': 706, 'n_tokens_neox': 682, 'n_words': 120}