mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-22 05:42:05 +07:00
feat: config.Marshaller allows negative depth
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user