aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/set.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-16 16:19:09 +0800
committerzelig <viktor.tron@gmail.com>2015-03-16 16:19:09 +0800
commit8139d444f8d8163251d1c96ef8034d186825ce32 (patch)
tree6be489bf8d99e68efd3ec7cccd62cf6680d109b0 /ethutil/set.go
parentece5c2aade24228006ef67c9a01b62f95e9b3bad (diff)
parent0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff)
downloadgo-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.tar
go-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.tar.gz
go-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.tar.bz2
go-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.tar.lz
go-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.tar.xz
go-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.tar.zst
go-tangerine-8139d444f8d8163251d1c96ef8034d186825ce32.zip
Merge remote-tracking branch 'upstream/develop' into frontier/nodeadmin.js
Diffstat (limited to 'ethutil/set.go')
-rw-r--r--ethutil/set.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/ethutil/set.go b/ethutil/set.go
deleted file mode 100644
index 7955edac0..000000000
--- a/ethutil/set.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package ethutil
-
-type Settable interface {
- AsSet() UniqueSet
-}
-
-type Stringable interface {
- String() string
-}
-
-type UniqueSet map[string]struct{}
-
-func NewSet(v ...Stringable) UniqueSet {
- set := make(UniqueSet)
- for _, val := range v {
- set.Insert(val)
- }
-
- return set
-}
-
-func (self UniqueSet) Insert(k Stringable) UniqueSet {
- self[k.String()] = struct{}{}
-
- return self
-}
-
-func (self UniqueSet) Include(k Stringable) bool {
- _, ok := self[k.String()]
-
- return ok
-}
-
-func Set(s Settable) UniqueSet {
- return s.AsSet()
-}