diff options
Diffstat (limited to 'ethutil')
-rw-r--r-- | ethutil/list.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethutil/list.go b/ethutil/list.go index 18bf04792..0aa657a14 100644 --- a/ethutil/list.go +++ b/ethutil/list.go @@ -20,6 +20,10 @@ func NewList(t interface{}) *List { return &List{list, list.Len()} } +func EmptyList() *List { + return NewList([]interface{}{}) +} + // Get N element from the embedded slice. Returns nil if OOB. func (self *List) Get(i int) interface{} { if self.list.Len() > i { |