Skip to content

Go package with (ordered) interface map structure with iterator

Notifications You must be signed in to change notification settings

oruelle/go-itermap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-itermap

Go package with (ordered) interface map structure with iterator. Easy to use

package main

import (
    "fmt"

    "github.com/oruelle/go-itermap"
)

func main() {
    var v itermap.IterMap

    v.Set("c", "hello")
    v.Set("b", "world")
    v.Set(15, 24)

    fmt.Println(v.Get("a"))

    //Iterator
    for v.StartIter(); v.Next(); {
        k, v := v.Value()
        fmt.Println(k, v)
    }
}

Output :

<nil> false
c hello
b world
15 24

About

Go package with (ordered) interface map structure with iterator

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages