Skip to content

Commit 486f36d

Browse files
committed
fix: roll-back some changes
1 parent b7722bd commit 486f36d

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,3 @@ _testmain.go
3030
*.exe
3131
*.test
3232
*.prof
33-
34-
# GoLand
35-
.idea/

node.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"strings"
1010
)
1111

12-
// A NodeType is the type of Node.
12+
// A NodeType is the type of a Node.
1313
type NodeType uint
1414

1515
const (
@@ -345,12 +345,7 @@ func (n *Node) WriteWithOptions(writer io.Writer, opts ...OutputOption) (err err
345345
pastPreserveSpaces := config.preserveSpaces
346346
preserveSpaces := calculatePreserveSpaces(n, pastPreserveSpaces)
347347
b := bufio.NewWriter(writer)
348-
defer func(b *bufio.Writer) {
349-
err = b.Flush()
350-
if err != nil {
351-
// Handle the error?
352-
}
353-
}(b)
348+
defer b.Flush()
354349

355350
ident := newIndentation(config.useIndentation, b)
356351
if config.printSelf && n.Type != DocumentNode {

0 commit comments

Comments
 (0)