Documentation
¶
Overview ¶
Package guid2english provides a transform.Transformer which replaces all GUIDs in the input with their known English representation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TemplateMapper ¶
type TemplateMapper struct {
// contains filtered or unexported fields
}
TemplateMapper implements mapper using Go's text/template package. The template can refer to the following variables:
- {{.Guid}}: The GUID being mapped
- {{.Name}}: The English name of the GUID or "UNKNOWN"
- {{.IsKnown}}: Set to true when the English name is not known
func NewTemplateMapper ¶
func NewTemplateMapper(tmpl *template.Template) *TemplateMapper
NewTemplateMapper creates a new TemplateMapper given a Template.
type Transformer ¶
type Transformer struct {
// contains filtered or unexported fields
}
Transformer replaces all the GUIDs using the Mapper interface. For example, this can replace all the GUIDs with their's English representation.
func (*Transformer) Reset ¶
func (t *Transformer) Reset()
Reset implements transform.Transformer.Reset().
Click to show internal directories.
Click to hide internal directories.