Copy edit comments in fsm/formatter

Fixing a typo and language.

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
This commit is contained in:
Matthias Rampke 2018-10-10 21:31:51 +00:00
parent 97f71db21b
commit e5734e34e9
No known key found for this signature in database
GPG key ID: 2CDE413A9BD0A5BC

View file

@ -30,8 +30,8 @@ type TemplateFormatter struct {
fmtString string
}
// NewTemplateFormatter instantialize a TemplateFormatter
// from given template string and the maxium amount of captures.
// NewTemplateFormatter instantiates a TemplateFormatter
// from given template string and the maximum amount of captures.
func NewTemplateFormatter(template string, captureCount int) *TemplateFormatter {
matches := templateReplaceCaptureRE.FindAllStringSubmatch(template, -1)
if len(matches) == 0 {
@ -60,8 +60,8 @@ func NewTemplateFormatter(template string, captureCount int) *TemplateFormatter
}
}
// Format accepts a list containing captured strings and return the formatted string
// using the template stored in current TemplateFormatter.
// Format accepts a list containing captured strings and returns the formatted
// string using the template stored in current TemplateFormatter.
func (formatter *TemplateFormatter) Format(captures []string) string {
if formatter.captureCount == 0 {
// no label substitution, keep as it is