<commit_before>package main
import (
	"github.com/gambol99/go-marathon"
	"log"
	"github.com/leekchan/gtf"
	"bytes"
	"github.com/BurntSushi/toml"
	"text/template"
	"strings"
	"strconv"
)

type MarathonProvider struct {
	Watch          bool
	Endpoint       string
	marathonClient marathon.Marathon
	Domain         string
	Filename       string
}

var MarathonFuncMap = template.FuncMap{
	"getPort": func(task marathon.Task) string {
		for _, port := range task.Ports {
			return strconv.Itoa(port)
		}
		return ""
	},
	"getHost": func(application marathon.Application) string {
		for key, value := range application.Labels {
			if (key == "træfik.host") {
				return value
			}
		}
		return application.ID
	},
	"replace": func(s1 string, s2 string, s3 string) string {
		return strings.Replace(s3, s1, s2, -1)
	},
}<commit_msg>Marathon provider listener<commit_after>package main
import (
	"github.com/gambol99/go-marathon"
	"log"
	"github.com/leekchan/gtf"
	"bytes"
	"github.com/BurntSushi/toml"
	"text/template"
	"strings"
	"strconv"
)

type MarathonProvider struct {
	Watch          bool
	Endpoint       string
	marathonClient marathon.Marathon
	Domain         string
	Filename       string
}

var MarathonFuncMap = template.FuncMap{
	"getPort": func(task marathon.Task) string {
		for _, port := range task.Ports {
			return strconv.Itoa(port)
		}
		return ""
	},
	"getHost": func(application marathon.Application) string {
		for key, value := range application.Labels {
			if (key == "træfik.host") {
				return value
			}
		}
		return strings.Replace(application.ID, "/", "", 1)
	},
	"replace": func(s1 string, s2 string, s3 string) string {
		return strings.Replace(s3, s1, s2, -1)
	},
}
{'fraction_non_alphanumeric': 0.12588652482269502, 'fraction_numerical': 0.011229314420803783, 'mean_word_length': 3.4088541666666665, 'pattern_counts': {'":': 6, '<': 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': '6662949', 'n_tokens_mistral': 651, 'n_tokens_neox': 600, 'n_words': 137}