assets

package
v0.0.0-...-1f06296 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Internal

func Internal(name string) []byte

Internal returns the content of an internal asset registered under the given name, or nil when none was found.

func MockInternal

func MockInternal(name string, data []byte) (restore func())

MockInternal mocks the contents of an internal asset for use in testing.

func MockSnippetsForEdition

func MockSnippetsForEdition(name string, snippets []ForEditions) (restore func())

MockSnippetsForEdition mocks the contents of per-edition snippets.

func SnippetForEdition

func SnippetForEdition(name string, edition uint) []byte

SnippetForEdition returns a snippet registered under given name, applicable for the provided edition number.

Types

type ForEditions

type ForEditions struct {
	// First edition this snippet is used in
	FirstEdition uint
	// Snippet data
	Snippet []byte
}

ForEditions wraps a snippet that is used in editions starting with FirstEdition.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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