testing

package
v0.0.0-...-b2761b6 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2014 License: GPL-3.0, GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package whoopsie/identifier/testing implements a couple of Ids that are useful for testing things that use whoopsie/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) Generate

func (*FailingIdentifier) Generate() error

Generate fails with an ubiquitous error.

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) Generate

func (sid *SettableIdentifier) Generate() error

Generate does nothing.

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