Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromBinaryCodedDecimal ¶
FromBinaryCodedDecimal converts given 4-digit BCD value into an integer.
func ToBinaryCodedDecimal ¶
ToBinaryCodedDecimal converts given integer value to a 4-digit BCD value.
Types ¶
type ValueUnifier ¶
type ValueUnifier struct {
// contains filtered or unexported fields
}
ValueUnifier collects values from several sources. It can be queried whether all sources contained the same value - or return a default value.
func NewValueUnifier ¶
func NewValueUnifier(defaultValue interface{}) *ValueUnifier
NewValueUnifier returns a new instance of a ValueUnifier for given default value.
func (*ValueUnifier) Add ¶
func (unifier *ValueUnifier) Add(value interface{})
Add registers an additional value.
func (*ValueUnifier) Value ¶
func (unifier *ValueUnifier) Value() (result interface{})
Value returns the unified value - or the default value, if either no value was added or the registered values are not equal.
Click to show internal directories.
Click to hide internal directories.