properly

package module
v0.0.0-...-0322249 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: MIT Imports: 6 Imported by: 0

README

properly

Expressions to get values from an object graph.

value, found, err := properly.Value(objectGraph, "propertyA.someArray[2].propertyB")

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidIndex returned if an invalid index is used for an array.
	ErrInvalidIndex = errors.New("Invalid index")
	// ErrNotSupported returned if an unsupported value is encountered while
	// evaluating the expression.
	ErrNotSupported = errors.New("Value not supported")
	// ErrNotFound returned if a property was not found.
	ErrNotFound = errors.New("Property not found")
)

Functions

func String

func String(object interface{}, expr string) (s string, ok bool, err error)

String gets the string value from the object graph at the specified path.

func Value

func Value(object interface{}, expr string) (v interface{}, ok bool, err error)

Value gets the value of the object graph at the specified path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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