testing

package
v0.0.0-...-6789dc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0, GPL-3.0 Imports: 0 Imported by: 0

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 Failing

func Failing() *FailingIdentifier

Failing is the constructor for FailingIdentifier.

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.

Jump to

Keyboard shortcuts

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