mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 21:54:59 +07:00
feat: config.Marshaller allows negative depth
This commit is contained in:
parent
b88fef890d
commit
2edbdae72f
@ -45,6 +45,9 @@ func (m *Marshaller) Bytes() []byte {
|
||||
}
|
||||
|
||||
func (m *Marshaller) writeLine(depth int, line string) {
|
||||
if depth < 0 {
|
||||
depth = 0
|
||||
}
|
||||
m.buf.Write(bytes.Repeat([]byte{' '}, depth*m.IndentSpace))
|
||||
m.buf.WriteString(line)
|
||||
m.buf.WriteString("\n")
|
||||
|
Loading…
Reference in New Issue
Block a user