Documentation ¶
Overview ¶
Package testing implements a couple of Ids that are useful for testing things that use identifier.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailingIdentifier ¶
type FailingIdentifier struct{}
FailingIdentifier is an Id that always fails to generate.
func (*FailingIdentifier) String ¶
func (*FailingIdentifier) String() string
String returns "<Failing>".
The purpose of this is to make it easy to spot if you're using it by accident.
type SettableIdentifier ¶
type SettableIdentifier struct {
// contains filtered or unexported fields
}
SettableIdentifier is an Id that lets you set the value of the identifier.
By default the identifier's value is "<Settable>", so it's visible if you're misusing it.
func Settable ¶
func Settable() *SettableIdentifier
Settable is the constructor for SettableIdentifier.
func (*SettableIdentifier) Set ¶
func (sid *SettableIdentifier) Set(value string)
Set is the method you use to set the identifier.
func (*SettableIdentifier) String ¶
func (sid *SettableIdentifier) String() string
String returns the string you set.
Click to show internal directories.
Click to hide internal directories.