build

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Release = "standard"

Release refers to the standard release mode.

Variables

This section is empty.

Functions

func Select

func Select(v Var) interface{}

Select returns the field of v that corresponds to the current Release.

Since the caller typically makes a type assertion on the result, it is important to point out that type assertions are stricter than conversions. Specifically, you cannot write:

type myint int
Select(Var{0, 0}).(myint)

Because 0 will be interpreted as an int, which is not assignable to myint. Instead, you must explicitly cast each field in the Var, or cast the return value of Select after the type assertion. The former is preferred.

Types

type Var

type Var struct {
	Standard interface{}
	Testing  interface{}
	// contains filtered or unexported fields
}

A Var represents a variable whose value depends on which Release is being compiled. None of the fields may be nil, and all fields must have the same type.

Jump to

Keyboard shortcuts

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