Fix some indentation behavio + add indent flag

This commit is contained in:
2022-02-16 10:56:21 +01:00
parent a4834a0661
commit 0d1a6f8c82
7 changed files with 27 additions and 12 deletions

View File

@@ -1,6 +1,9 @@
package writers
// CountSpaces returns the number of spaces from the begining of the line
// IndentSize set the indentation size for yaml output.
var IndentSize = 2
// CountSpaces returns the number of spaces from the begining of the line.
func CountSpaces(line string) int {
var spaces int
for _, char := range line {