mirror of
https://github.com/go-ini/ini.git
synced 2026-06-19 21:46:45 +02:00
file: add DefaultFormat option around equal sign (#164)
Add option to have padding spaces around equal sign when PrettyFormat is disabled #161 eg: > ini.PrettyFormat = false > ini.DefaultFormatLeft = " " > ini.DefaultFormatRight = " "
This commit is contained in:
@@ -227,7 +227,8 @@ func (f *File) Append(source interface{}, others ...interface{}) error {
|
||||
}
|
||||
|
||||
func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) {
|
||||
equalSign := "="
|
||||
equalSign := DefaultFormatLeft + "=" + DefaultFormatRight
|
||||
|
||||
if PrettyFormat || PrettyEqual {
|
||||
equalSign = " = "
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user