Golang list with thread safe implementation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
Makefile
README.md
gotslist.go
gotslist_test.go

README.md

Support with donation

Support with donation

gotslist

Golang list with thread safe implementation

CI

Build Status

Installing

go get github.com/prsolucoes/gotslist

Importing into your project

import "github.com/prsolucoes/gotslist"

How to use

func ExampleHowToUse() {
	// new
	tslist := NewGoTSList()

	// add
	tslist.Push("New element")

	// remove
	for e := tslist.Front(); e != nil; e = e.Next() {
		tslist.Remove(e)
	}

	// len
	_ = tslist.Len()

	// is empty
	_ = tslist.IsEmpty()

	// lock and unlock
	tslist.Lock()
	tslist.Unlock()

	fmt.Println("ok")

	// Output: ok
}

Obs: There is a test method to use all methods

Test

make test

or

go test -v

Thanks.