util

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 8 Imported by: 5 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustReadDocs

func MustReadDocs(path string, n int) []doc.Document

MustReadDocs calls ReadDocs and panics if there is an error.

func NewUUID

func NewUUID() ([]byte, error)

NewUUID returns a new UUID.

func NewUUIDForbidden

func NewUUIDForbidden() ([]byte, error)

NewUUIDForbidden is NewUUIDFn which always returns an error in the case that UUIDs are forbidden.

func ReadDocs

func ReadDocs(path string, n int) ([]doc.Document, error)

ReadDocs reads up to n documents from a JSON formatted file at the provided path. It is useful for getting a set of documents to run tests with.

Types

type NewUUIDFn

type NewUUIDFn func() ([]byte, error)

NewUUIDFn is a function for creating new UUIDs.

Jump to

Keyboard shortcuts

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