Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stringset

GoDoc Build Status Go Report Card codecov Maintainability HitCount

stringset creates sets for strings in golang that are concurrency safe

Installation

go get -u github.com/axamon/stringset

Usage

package main

import (
    "fmt"
    "github.com/axamon/stringset"
)

func main() {
    testSet := NewStringSet("pippo", "pluto", "paperino", "pippo")
      
	slice := testSet.Strings()
	sort.Strings(slice)
	for _, element := range slice {
		fmt.Println(element)
	}
	// Output:
	// paperino
	// pippo
	// pluto
}

Benchmarks

BenchmarkAdd-16          	 3000000	       497 ns/op

BenchmarkDelete-16       	 3000000	       539 ns/op

BenchmarkIntersect-16    	 1000000	      2168 ns/op

BenchmarkUnion-16        	 2000000	      1825 ns/op

About

a set for strings written in go that is concurrency safe

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages