2022-11-24 17:14:47 +00:00
|
|
|
package imports
|
|
|
|
|
|
|
|
type FormatterOptionFn func(*Formatter)
|
|
|
|
|
2022-11-24 17:21:59 +00:00
|
|
|
func FormatterWithList(isList bool) FormatterOptionFn {
|
2022-11-25 19:10:19 +00:00
|
|
|
return func(ft *Formatter) {
|
|
|
|
ft.isList = isList
|
2022-11-24 17:14:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-24 17:21:59 +00:00
|
|
|
func FormatterWithWrite(isWrite bool) FormatterOptionFn {
|
2022-11-25 19:10:19 +00:00
|
|
|
return func(ft *Formatter) {
|
|
|
|
ft.isWrite = isWrite
|
2022-11-24 17:14:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-24 17:21:59 +00:00
|
|
|
func FormatterWithDiff(isDiff bool) FormatterOptionFn {
|
2022-11-25 19:10:19 +00:00
|
|
|
return func(ft *Formatter) {
|
|
|
|
ft.isDiff = isDiff
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func FormatterWithVerbose(isVerbose bool) FormatterOptionFn {
|
|
|
|
return func(ft *Formatter) {
|
|
|
|
ft.isVerbose = isVerbose
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func FormatterWithCompanyPrefix(companyPrefix string) FormatterOptionFn {
|
|
|
|
return func(ft *Formatter) {
|
|
|
|
ft.companyPrefix = companyPrefix
|
2022-11-24 17:14:47 +00:00
|
|
|
}
|
|
|
|
}
|