Skip to content

Commit

Permalink
Don't add comments with a hashtag (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
JKJameson committed Mar 31, 2023
1 parent 7b66f3b commit cfa29b0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions parser/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"errors"
"fmt"
"sort"

"github.com/gookit/goutil/timex"
)

// Encode golang data(map, struct) to INI string.
Expand Down Expand Up @@ -44,7 +42,7 @@ func EncodeFull(data map[string]any, defSection ...string) (out []byte, err erro

buf := &bytes.Buffer{}
buf.Grow(ln * 4)
buf.WriteString("# exported at " + timex.Now().Datetime() + "\n\n")
//buf.WriteString("# exported at " + timex.Now().Datetime() + "\n\n")
secBuf := &bytes.Buffer{}

sort.Strings(sortedGroups)
Expand Down Expand Up @@ -126,11 +124,11 @@ func EncodeLite(data map[string]map[string]string, defSection ...string) (out []

buf := &bytes.Buffer{}
buf.Grow(ln * 4)
buf.WriteString("# exported at " + timex.Now().Datetime() + "\n\n")
//buf.WriteString("# exported at " + timex.Now().Datetime() + "\n\n")

// first, write default section values
if defSec, ok := data[defSecName]; ok {
buf.WriteString("# values for default section\n")
//buf.WriteString("# values for default section\n")
writeStringMap(buf, defSec)
buf.WriteByte('\n')
}
Expand Down

0 comments on commit cfa29b0

Please sign in to comment.