pathreflect

package
v0.0.0-...-8b1022e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

README

pathreflect Travis CI Status Coverage Status GoDoc

package pathreflect provides the ability to address an object graph using a path notation and then modify the addressed node.

v1 is the current version. Import and doc information on gopkg.in.

Documentation

Overview

package pathreflect provides the ability to address an object graph using a path notation and then modify the addressed node.

Index

Constants

View Source
const (
	PathSep = "/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Path

type Path []string

func Parse

func Parse(pathString string) Path

func (Path) Clear

func (p Path) Clear(on interface{}) error

Clear clears the given value in the given on at this Path.

func (Path) Get

func (p Path) Get(on interface{}) (interface{}, error)

Get gets the value in the given on at this Path.

func (Path) Set

func (p Path) Set(on interface{}, val interface{}) error

Set sets the given value in the given on at this Path.

func (Path) String

func (p Path) String() string

func (Path) ZeroValue

func (p Path) ZeroValue(on interface{}) (val interface{}, err error)

ZeroValue returns the ZeroValue corresponding to the type of element at this path.

Jump to

Keyboard shortcuts

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