1
0
Fork 0
CLI tool to search unicode data backed by SQLite3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
piken/format/formatter.go

31 lines
559 B

package format // import "eriol.xyz/piken/format"
import "eriol.xyz/piken/sql"
type Formatter interface {
Format(*sql.UnicodeData) (string, error)
}
type baseFormatter struct {
fields []string
showGlyph bool
}
7 years ago
func (bf *baseFormatter) SetFields(fields []string) {
for _, field := range fields {
7 years ago
bf.fields = append(bf.fields, field)
}
}
7 years ago
func (bf baseFormatter) Fields() []string {
return bf.fields
}
7 years ago
func (bf *baseFormatter) SetShowGlyph(value bool) {
bf.showGlyph = value
}
7 years ago
func (bf baseFormatter) ShowGlyph() bool {
return bf.showGlyph
}