options

package
v0.4.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilOptions = errors.New("attempted to configure a nil option set")
)

Functions

This section is empty.

Types

type ConfigDirectiveAPI added in v0.4.30

type ConfigDirectiveAPI struct {
	*Options
}

ConfigDirectiveAPI provides an indirect API for user directive interactions with a Table - without causing cyclic imports :-(

See directive.ConfigAPI

func (*ConfigDirectiveAPI) SetLocaleTag added in v0.4.30

func (cfg *ConfigDirectiveAPI) SetLocaleTag(localeTag string)

func (*ConfigDirectiveAPI) SetPrefix added in v0.4.30

func (cfg *ConfigDirectiveAPI) SetPrefix(prefix string)

func (*ConfigDirectiveAPI) SetPrefixPattern added in v0.4.30

func (cfg *ConfigDirectiveAPI) SetPrefixPattern(pattern string)

func (*ConfigDirectiveAPI) SetProfile added in v0.4.30

func (cfg *ConfigDirectiveAPI) SetProfile(profile *profile.Profile)

type Option

type Option func(*Options) error

func WithDirectiveArgs added in v0.4.30

func WithDirectiveArgs(args []string) Option

any number of inline directives, e.g. sort insert wip delete bad ...

func WithLocaleTag

func WithLocaleTag(localeTag string) Option

see also "locale" directive

func WithMatchPattern added in v0.4.30

func WithMatchPattern(pattern string) Option

see also "prefix" directive

func WithPrefix

func WithPrefix(prefix string) Option

see also "prefix" directive

func WithProfile

func WithProfile(profile *profile.Profile) Option

see also "profile" directive

func WithProfileName

func WithProfileName(name string) Option

see also "profile" directive

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options provides configuration parameters for tables and documents

By default, the options for a document or table are nil.

  • All options MUST be set via the appropriate With{Option} function.
  • All options are provided as pointer methods which return default values for nil pointers!

func New

func New(opts ...Option) *Options

New creates a new set of options.

func (*Options) Configure

func (o *Options) Configure(opts ...Option)

func (*Options) DirectiveArgs added in v0.4.30

func (o *Options) DirectiveArgs() []string

func (*Options) Directives added in v0.4.30

func (o *Options) Directives() []api.Directive

func (*Options) Errors

func (o *Options) Errors() error

func (*Options) LocaleTag

func (o *Options) LocaleTag() string

func (*Options) Prefix

func (o *Options) Prefix(matchedPrefix string) string

func (*Options) PrefixMatcher

func (o *Options) PrefixMatcher() *prefix.Matcher

func (*Options) Profile

func (o *Options) Profile() *profile.Profile

func (*Options) String

func (o *Options) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL