Remove unnecessary type alias for strings.Builder

TIL embedded types can be acessed by their non-namespaced name - so there
actually is no need for a type alias to access .strings.Builder, one can just
use .Builder.
This commit is contained in:
Niklas Fasching 2019-01-05 13:02:29 +01:00
parent faea88d48e
commit 3e14771ebf
2 changed files with 4 additions and 6 deletions

View file

@ -7,12 +7,10 @@ import (
"unicode/utf8"
)
type stringBuilder = strings.Builder
// OrgWriter export an org document into pretty printed org document.
type OrgWriter struct {
TagsColumn int
stringBuilder
strings.Builder
indent string
}
@ -38,7 +36,7 @@ func (w *OrgWriter) After(d *Document) {}
func (w *OrgWriter) emptyClone() *OrgWriter {
wcopy := *w
wcopy.stringBuilder = strings.Builder{}
wcopy.Builder = strings.Builder{}
return &wcopy
}