Go style: take advantage of zero value init
Vytautas Ĺ altenis vytas@rtfb.lt
Tue, 05 Apr 2016 14:34:30 +0300
2 files changed,
2 insertions(+),
6 deletions(-)
M
html.go
→
html.go
@@ -101,7 +101,7 @@ // table of contents data
tocMarker int headerCount int currentLevel int - toc *bytes.Buffer + toc bytes.Buffer // Track header IDs to prevent ID collision in a single generation. headerIDs map[string]int@@ -151,10 +151,6 @@ flags: params.Flags,
extensions: params.Extensions, closeTag: closeTag, parameters: params, - - headerCount: 0, - currentLevel: 0, - toc: new(bytes.Buffer), headerIDs: make(map[string]int),
M
markdown.go
→
markdown.go
@@ -351,7 +351,7 @@ Extensions: CommonExtensions,
}) // set up the parser - return Markdown(input, renderer, Options{Extensions: 0}) + return Markdown(input, renderer, Options{}) } // Call Markdown with most useful extensions enabled