Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownCase = errUnknownCase{} ErrUnknownPrefix = errUnknownPrefix{} )
Functions ¶
func DefaultIfEmpty ¶
func SingleLine ¶ added in v0.0.3
Types ¶
type RegisteredCases ¶
type RegisteredCases struct {
// contains filtered or unexported fields
}
func SwitchExact ¶
func SwitchExact(actual string) *RegisteredCases
func (*RegisteredCases) AddCase ¶
func (r *RegisteredCases) AddCase(c string) bool
func (*RegisteredCases) String ¶
func (r *RegisteredCases) String() string
func (*RegisteredCases) ToUnknownCaseErr ¶
func (r *RegisteredCases) ToUnknownCaseErr() error
type RegisteredPrefixes ¶
type RegisteredPrefixes struct {
// contains filtered or unexported fields
}
func SwitchPrefix ¶
func SwitchPrefix(actual string) *RegisteredPrefixes
func (*RegisteredPrefixes) HasPrefix ¶
func (r *RegisteredPrefixes) HasPrefix(prefix string) bool
func (*RegisteredPrefixes) String ¶
func (r *RegisteredPrefixes) String() string
func (*RegisteredPrefixes) ToUnknownPrefixErr ¶
func (r *RegisteredPrefixes) ToUnknownPrefixErr() error
Click to show internal directories.
Click to hide internal directories.