yname

package
Version: v0.0.0-...-ea83e0a Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSep

func GetSep(doc interface{}, path string, sep byte) (interface{}, error)

GetSep finds a path within a structure composed of nested maps and slices. The path separator sep is given explicitly.

func GetSplit

func GetSplit(doc interface{}, path string, split SplitFunc) (interface{}, error)

GetSplit finds a path within a structure composed of nested maps and slices. You must supply the function to split the path.

Types

type SplitFunc

type SplitFunc func(path string) (head, tail string)

SplitFunc is a utility type for a function which takes a path "a/b/c" and splits it to head="a" and tail="b/c". The separator is defined within the function.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL