user/shadow.go
func LookupInShadow(field shadowField, value interface{}, n int) ([]*Shadow, error) {
	checkRoot()

	iEntries, err := lookUp(&Shadow{}, field, value, n)
	if err != nil {
		return nil, err
	}

	// == Convert to type shadow
	valueSlice := reflect.ValueOf(iEntries)
	entries := make([]*Shadow, valueSlice.Len())

	for i := 0; i < valueSlice.Len(); i++ {
		entries[i] = valueSlice.Index(i).Interface().(*Shadow)
	}

	return entries, err
}
func LookupInShadow(field shadowField, value interface{}, n int) ([]*Shadow, error) {
	checkRoot()

	iEntries, err := lookUp(&Shadow{}, field, value, n)
	if err != nil {
		return nil, err
	}

	// == Convert to type shadow
	valueSlice := reflect.ValueOf(iEntries)
	entries := make([]*Shadow, valueSlice.Len())

	for i := 0; i < valueSlice.Len(); i++ {
		entries[i] = valueSlice.Index(i).Interface().(*Shadow)
	}

	return entries, err
}
// LookupInShadow looks up a shadowed password by the given values.
//
// The count determines the number of fields to return:
//   n > 0: at most n fields
//   n == 0: the result is nil (zero fields)
//   n < 0: all fields