func newStructFLS(p interface{}) (FieldLoadSaver, error) {
	v := reflect.ValueOf(p)
	if v.Kind() != reflect.Ptr || v.IsNil() || v.Elem().Kind() != reflect.Struct {
		return nil, ErrInvalidDocumentType
	}
	codec, err := loadCodec(v.Elem().Type())
	if err != nil {
		return nil, err
	}
	return structFLS{v.Elem(), codec}, nil
}
func newStructFLS(p interface{}) (FieldLoadSaver, error) {
	v := reflect.ValueOf(p)
	if v.Kind() != reflect.Ptr || v.IsNil() || v.Elem().Kind() != reflect.Struct {
		return nil, ErrInvalidDocumentType
	}
	codec, err := loadCodec(v.Elem().Type())
	if err != nil {
		return nil, err
	}
	return structFLS{v.Elem(), codec}, nil
}
func newStructFLS ( p interface { } ) ( FieldLoadSaver , error ) { v := reflect . ValueOf ( p ) if v . Kind ( ) != reflect . Ptr || v . IsNil ( ) || v . Elem ( ) . Kind ( ) != reflect . Struct { return nil , ErrInvalidDocumentType } codec , err := loadCodec ( v . Elem ( ) . Type ( ) ) if err != nil { return nil , err } return structFLS { v . Elem ( ) , codec } , nil }
// newStructFLS returns a FieldLoadSaver for the struct pointer p.
newStructFLS returns a FieldLoadSaver for the struct pointer p .