base

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package base provides common items used by other packages to standardize the tests and benchmarks.

Index

Constants

View Source
const ObjectJSON = `{"name":"","contents":{"value":0}}`

ObjectJSON is the zero-value JSON representation of Object.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contents

type Contents struct {
	Value int `json:"value"`
}

Contents is an example struct embedded within the Object struct.

func (*Contents) Reset

func (contents *Contents) Reset()

Reset resets contents to the default value.

func (*Contents) String

func (contents *Contents) String() string

String satisfies the fmt.Stringer interface for Contents.

type Object

type Object struct {
	Name     string    `json:"name"`
	Contents *Contents `json:"contents"`
}

Object is an example struct containing a string and pointer to another struct.

func (*Object) Reset

func (object *Object) Reset()

Reset resets object to default values.

func (*Object) String

func (object *Object) String() string

String satisfies the fmt.Stringer interface for Object.

Jump to

Keyboard shortcuts

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