test

package
v0.0.0-...-ac903f2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithVar

func WithVar(dst interface{}, src interface{}) func()

WithVar sets the given var to the src value and returns a function to revert to the original state. The type of `dst` has to be a settable pointer. The value of `src` has to be assignable to the type of `dst`.

Example usage: ``` v := "foo" defer WithVar(&v, "bar")() ```

Types

This section is empty.

Jump to

Keyboard shortcuts

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