summaryrefslogtreecommitdiff
path: root/src/nslcd_proto/util/enumerator@T.got
diff options
context:
space:
mode:
Diffstat (limited to 'src/nslcd_proto/util/enumerator@T.got')
-rw-r--r--src/nslcd_proto/util/enumerator@T.got45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/nslcd_proto/util/enumerator@T.got b/src/nslcd_proto/util/enumerator@T.got
deleted file mode 100644
index 5ce5cb5..0000000
--- a/src/nslcd_proto/util/enumerator@T.got
+++ /dev/null
@@ -1,45 +0,0 @@
-package util
-
-import "nslcd_proto"
-
-type <T>_List struct {
- dat []nslcd_proto.<T>
- i int
-}
-
-var _ nslcd_proto.<T>_Enumerator = &<T>_List{}
-
-func New_<T>_List(ary []nslcd_proto.<T>) *<T>_List {
- return &<T>_List{ary, 0}
-}
-
-func (o *<T>_List) GetNext() (n *nslcd_proto.<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) {
- a, err := o.GetNext()
- if a != nil {
- b := (interface{})(*a)
- n = &b
- }
- return
-}
-
-type <T>_Ø struct{}
-
-var _ nslcd_proto.<T>_Enumerator = <T>_Ø{}
-
-func (o <T>_Ø) GetNext() (*nslcd_proto.<T>, error) {
- return nil, nil
-}
-func (o <T>_Ø) GenericGetNext() (*interface{}, error) {
- return nil, nil
-}
-
-// -*- Mode: Go -*-