must

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool, err error) bool

Bool panics if the error is set, otherwise returns b.

func Bytes

func Bytes(b []byte, err error) []byte

Bytes panics if the error is set, otherwise returns b.

func Check

func Check(b bool, err error)

Check panics if b is false. This is similar to Bool, but intended for use by runtime checks, rather than by functions that return (bool, error).

func Duration

func Duration(d time.Duration, err error) time.Duration

Duration panics if the error is set, otherwise returns d.

func GroupVersion

func GroupVersion(gv schema.GroupVersion, err error) schema.GroupVersion

GroupVersion panics if the error is set, otherwise returns b.

func Int

func Int(i int, err error) int

Int panics if the error is set, otherwise returns i.

func Module

func Module(m *ast.Module, err error) *ast.Module

Module ...

func Must

func Must(err error)

Must panics if the error is set.

func String

func String(s string, err error) string

String panics if the error is set, otherwise returns s.

func StringSlice

func StringSlice(s []string, err error) []string

StringSlice panics if the error is set, otherwise returns s.

func Unstructured

Unstructured ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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