func Grab(s interface{}, path string, d ...interface{}) interface{} {
	var (
		val interface{}
		ok  bool
	)

	if val, ok = GrabOk(s, path); ok {
		return val
	}

	if len(d) > 0 {
		return d[0]
	}

	return val
}
// Grab returns the value specified by the path given,
// starting from the struct s.
// If at any point in the path the lookup falls short
// (i.e. a field is not found), or if the last field in the path is nil
// itself, a type-appropriate zero-value is returned.
// This behavior can be overidden by providing a default value.
//
// This is useful for getting values our of deeply nested structures
// Example: val := sl.Grab(virtualGuest, "Datacenter.Name")
Grab returns the value specified by the path given,
starting from the struct s.
If at any point in the path the lookup falls short
, or if the last field in the path is nil
itself, a type-appropriate zero-value is returned.
This behavior can be overidden by providing a default value.

This is useful for getting values our of deeply nested structures
Example: val := sl.Grab(virtualGuest, "Datacenter.Name")
// Grab returns the value specified by the path given // starting from the struct s . // If at any point in the path the lookup falls short // ( i . e . a field is not found ) or if the last field in the path is nil // itself a type - appropriate zero - value is returned . // This behavior can be overidden by providing a default value . // // This is useful for getting values our of deeply nested structures // Example : val : = sl . Grab ( virtualGuest " Datacenter . Name " )
func Grab(s interface{}, path string, d ...interface{}) interface{} {
	var (
		val interface{}
		ok  bool
	)
	if val, ok = GrabOk(s, path); ok {
		return val
	}
	if len(d) > 0 {
		return d[0]
	}
	return val
}
func Grab ( s interface { } , path string , d ... interface { } ) interface { } { var ( val interface { } ok bool ) if val , ok = GrabOk ( s , path ) ; ok { return val } if len ( d ) > 0 { return d [ 0 ] } return val }
Grab returns the value specified by the path given,
starting from the struct s.
If at any point in the path the lookup falls short
, or if the last field in the path is nil
itself, a type-appropriate zero-value is returned.
Grab returns the value specified by the path given starting from the struct s . If at any point in the path the lookup falls short or if the last field in the path is nil itself a type - appropriate zero - value is returned .