rename adoc.NewADoc to adoc.New
This commit is contained in:
parent
19966f0fc6
commit
496d9a21d8
2
adoc.go
2
adoc.go
|
@ -15,7 +15,7 @@ type ADoc struct {
|
|||
Content []element.Element
|
||||
}
|
||||
|
||||
func NewADoc() *ADoc {
|
||||
func New() *ADoc {
|
||||
return &ADoc{
|
||||
Attributes: map[string]string{},
|
||||
Content: []element.Element{},
|
||||
|
|
|
@ -29,7 +29,7 @@ func TestHeader(t *testing.T) {
|
|||
{
|
||||
name: "empty title",
|
||||
input: "= ",
|
||||
exp: adoc.NewADoc(),
|
||||
exp: adoc.New(),
|
||||
},
|
||||
{
|
||||
name: "full header",
|
||||
|
|
|
@ -21,7 +21,7 @@ func New(reader io.Reader) *Parser {
|
|||
|
||||
func NewParserFromChannel(toks chan token.Token) *Parser {
|
||||
return &Parser{
|
||||
doc: adoc.NewADoc(),
|
||||
doc: adoc.New(),
|
||||
tr: token.NewTokenReader(toks),
|
||||
els: []element.Element{},
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ func TestParser(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
name: "empty",
|
||||
exp: adoc.NewADoc(),
|
||||
exp: adoc.New(),
|
||||
},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue