Skip to content

Commit

Permalink
cleanup of #41
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Oct 19, 2019
1 parent acb5d2e commit edc9ac4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module github.com/magiconair/properties

go 1.13
7 changes: 4 additions & 3 deletions properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,11 @@ func (p *Properties) WriteComment(w io.Writer, prefix string, enc Encoding) (n i
}
}
}
if p.WriteSeparator == "" {
p.WriteSeparator = " = "
sep := " = "
if p.WriteSeparator != "" {
sep = p.WriteSeparator
}
x, err = fmt.Fprintf(w, "%s%s%s\n", encode(key, " :", enc), p.WriteSeparator, encode(value, "", enc))
x, err = fmt.Fprintf(w, "%s%s%s\n", encode(key, " :", enc), sep, encode(value, "", enc))
if err != nil {
return
}
Expand Down

0 comments on commit edc9ac4

Please sign in to comment.