mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-22 23:41:00 +00:00
Copy edit comments in fsm/formatter
Fixing a typo and language. Signed-off-by: Matthias Rampke <mr@soundcloud.com>
This commit is contained in:
parent
97f71db21b
commit
e5734e34e9
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue