// Build builds the root Collator. func (b *Builder) Build() (*collate.Collator, error) { t, err := b.build() if err != nil { return nil, err } return collate.Init(t), nil }
// Build builds a Collator for the given locale. To build the root table, set locale to "". func (b *Builder) Build(locale string) (*collate.Collator, error) { t, err := b.build() if err != nil { return nil, err } // TODO: support multiple locales return collate.Init(t), nil }
// Build builds the root Collator. func (b *Builder) Build() (*collate.Collator, error) { t, err := b.build() if err != nil { return nil, err } c := collate.Init(t) if c == nil { panic("generated table of incompatible type") } return c, nil }
// Build builds the root Collator. func (b *Builder) Build() (*collate.Collator, error) { t, err := b.build() if err != nil { return nil, err } table := collate.Init(t) if table == nil { panic("generated table of incompatible type") } return collate.NewFromTable(table), nil }