mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-15 07:38:14 +00:00
26 lines
491 B
Go
26 lines
491 B
Go
package yqlib
|
|
|
|
type JsonPreferences struct {
|
|
Indent int
|
|
ColorsEnabled bool
|
|
UnwrapScalar bool
|
|
}
|
|
|
|
func NewDefaultJsonPreferences() JsonPreferences {
|
|
return JsonPreferences{
|
|
Indent: 2,
|
|
ColorsEnabled: true,
|
|
UnwrapScalar: true,
|
|
}
|
|
}
|
|
|
|
func (p *JsonPreferences) Copy() JsonPreferences {
|
|
return JsonPreferences{
|
|
Indent: p.Indent,
|
|
ColorsEnabled: p.ColorsEnabled,
|
|
UnwrapScalar: p.UnwrapScalar,
|
|
}
|
|
}
|
|
|
|
var ConfiguredJSONPreferences = NewDefaultJsonPreferences()
|