diff options
Diffstat (limited to 'src/nslcd_proto/enumerator@T.got')
-rw-r--r-- | src/nslcd_proto/enumerator@T.got | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/nslcd_proto/enumerator@T.got b/src/nslcd_proto/enumerator@T.got index 5a540ae..023c774 100644 --- a/src/nslcd_proto/enumerator@T.got +++ b/src/nslcd_proto/enumerator@T.got @@ -1,4 +1,3 @@ -// -*- Mode: Go -*- package nslcd_proto type <T>_Enumerator interface { @@ -6,37 +5,4 @@ type <T>_Enumerator interface { GenericGetNext() (n interface{}, err error) } -type <T>_List struct { - dat []<T> - i int -} - -var _ <T>_Enumerator = &<T>_List{} - -func New_<T>_List(ary []<T>) *<T>_List { - return &<T>_List{ary, 0} -} - -func (o *<T>_List) GetNext() (n *<T>, err error) { - if o.i < len(o.dat) { - n = &o.dat[o.i] - o.i++ - } - err = nil - return -} - -func (o *<T>_List) GenericGetNext() (n interface{}, err error) { - return o.GetNext() -} - -type <T>_Ø struct{} - -var _ <T>_Enumerator = <T>_Ø{} - -func (o <T>_Ø) GetNext() (*<T>, error) { - return nil, nil -} -func (o <T>_Ø) GenericGetNext() (interface{}, error) { - return nil, nil -} +// -*- Mode: Go -*- |