diff options
Diffstat (limited to 'src/nslcd_proto/util')
-rw-r--r-- | src/nslcd_proto/util/enumerator@T.got | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nslcd_proto/util/enumerator@T.got b/src/nslcd_proto/util/enumerator@T.got index e1dd2ae..5ce5cb5 100644 --- a/src/nslcd_proto/util/enumerator@T.got +++ b/src/nslcd_proto/util/enumerator@T.got @@ -22,8 +22,13 @@ func (o *<T>_List) GetNext() (n *nslcd_proto.<T>, err error) { return } -func (o *<T>_List) GenericGetNext() (n interface{}, err error) { - return o.GetNext() +func (o *<T>_List) GenericGetNext() (n *interface{}, err error) { + a, err := o.GetNext() + if a != nil { + b := (interface{})(*a) + n = &b + } + return } type <T>_Ø struct{} @@ -33,7 +38,7 @@ var _ nslcd_proto.<T>_Enumerator = <T>_Ø{} func (o <T>_Ø) GetNext() (*nslcd_proto.<T>, error) { return nil, nil } -func (o <T>_Ø) GenericGetNext() (interface{}, error) { +func (o <T>_Ø) GenericGetNext() (*interface{}, error) { return nil, nil } |