Documentation
¶
Overview ¶
Package structure add some missing common data structures to Golang
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
Set is a map with string key and bool value It is not thread safe and modeled after https://github.com/deckarep/golang-set/blob/master/threadunsafe.go
func NewSet ¶
NewSet return a pointer of a set using arguments passed to the function
Example ¶
s := NewSet("a", "b", "c")
fmt.Println(s.Size())
Output: 3
func (*Set) Contains ¶
Contains check if a key is presented in the map, it does NOT check the bool value
type StringTreeNode ¶
type StringTreeNode struct {
Val string
Children []StringTreeNode
}
func (*StringTreeNode) Append ¶
func (tree *StringTreeNode) Append(child StringTreeNode)
func (*StringTreeNode) Print ¶
func (tree *StringTreeNode) Print()
func (*StringTreeNode) PrintTo ¶
func (tree *StringTreeNode) PrintTo(w io.Writer)
Click to show internal directories.
Click to hide internal directories.