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.
18 lines
378 B
18 lines
378 B
package state |
|
|
|
var defaultOptions = Options{ |
|
Mapping: func(states S, setters *[]Setter) {}, |
|
} |
|
|
|
type Options struct { |
|
Mapping func(states S, setters *[]Setter) |
|
} |
|
|
|
type Option func(*Options) |
|
|
|
// WithState2Mapping sync to channel state mapping |
|
func WithState2Mapping(mapping func(states S, setters *[]Setter)) Option { |
|
return func(opts *Options) { |
|
opts.Mapping = mapping |
|
} |
|
}
|
|
|