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
|
Content []element.Element
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewADoc() *ADoc {
|
func New() *ADoc {
|
||||||
return &ADoc{
|
return &ADoc{
|
||||||
Attributes: map[string]string{},
|
Attributes: map[string]string{},
|
||||||
Content: []element.Element{},
|
Content: []element.Element{},
|
||||||
|
|
|
@ -29,7 +29,7 @@ func TestHeader(t *testing.T) {
|
||||||
{
|
{
|
||||||
name: "empty title",
|
name: "empty title",
|
||||||
input: "= ",
|
input: "= ",
|
||||||
exp: adoc.NewADoc(),
|
exp: adoc.New(),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "full header",
|
name: "full header",
|
||||||
|
|
|
@ -21,7 +21,7 @@ func New(reader io.Reader) *Parser {
|
||||||
|
|
||||||
func NewParserFromChannel(toks chan token.Token) *Parser {
|
func NewParserFromChannel(toks chan token.Token) *Parser {
|
||||||
return &Parser{
|
return &Parser{
|
||||||
doc: adoc.NewADoc(),
|
doc: adoc.New(),
|
||||||
tr: token.NewTokenReader(toks),
|
tr: token.NewTokenReader(toks),
|
||||||
els: []element.Element{},
|
els: []element.Element{},
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ func TestParser(t *testing.T) {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "empty",
|
name: "empty",
|
||||||
exp: adoc.NewADoc(),
|
exp: adoc.New(),
|
||||||
},
|
},
|
||||||
} {
|
} {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue