diff options
Diffstat (limited to 'src/nslcd_proto/enumerator@T.got')
-rw-r--r-- | src/nslcd_proto/enumerator@T.got | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nslcd_proto/enumerator@T.got b/src/nslcd_proto/enumerator@T.got index 06d6171..5a540ae 100644 --- a/src/nslcd_proto/enumerator@T.got +++ b/src/nslcd_proto/enumerator@T.got @@ -11,6 +11,8 @@ type <T>_List struct { i int } +var _ <T>_Enumerator = &<T>_List{} + func New_<T>_List(ary []<T>) *<T>_List { return &<T>_List{ary, 0} } @@ -23,15 +25,18 @@ func (o *<T>_List) GetNext() (n *<T>, err error) { err = nil return } + func (o *<T>_List) GenericGetNext() (n interface{}, err error) { return o.GetNext() } type <T>_Ø struct{} -func (o *<T>_Ø) GetNext() (*<T>, error) { +var _ <T>_Enumerator = <T>_Ø{} + +func (o <T>_Ø) GetNext() (*<T>, error) { return nil, nil } -func (o *<T>_Ø) GenericGetNext() (interface{}, error) { +func (o <T>_Ø) GenericGetNext() (interface{}, error) { return nil, nil } |