struct

module
v0.0.0-...-da13845 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2019 License: MIT

README

Build Status codecov

GoDoc collection

import "github.com/khezen/struct/collection"

Exposes base collection interface and mixing operations(union, intersection, etc...)

type Interface interface {
	Add(...interface{})
	Remove(...interface{})
	Replace(item, substitute interface{})
	Has(...interface{}) bool
	Each(func(item interface{}) bool)

	Len() int
	Clear()
	IsEmpty() bool
	IsEqual(Interface) bool

	Merge(Interface)
	Separate(Interface)
	Retain(Interface)

	String() string
	Slice() []interface{}
	CopyCollection() Interface
}
func Union(collections ...Interface) Interface
func Difference(collections ...Interface) Interface
func Intersection(collections ...Interface) Interface
func Exclusion(collections ...Interface) Interface

GoDoc array

import "github.com/khezen/struct/array"

Abstraction layer over slices exposing utility functions and synchronized implementation of dynamic array.

GoDoc set

import "github.com/khezen/struct/set"

Both synchronized and non-synchronized implementations of a generic set data structure.

GoDoc ordered set

import "github.com/khezen/struct/oset"

Both synchronized and non-synchronized implementations of a generic ordered set data structure.

GoDoc hashmap

import "github.com/khezen/struct/hashmap"

Both synchronized and non-synchronized implementations of a generic hashmap data structure.

Directories

Path Synopsis
Package array provides both threadsafe and non-threadsafe implementations of a generic dynamic array.
Package array provides both threadsafe and non-threadsafe implementations of a generic dynamic array.
Package set provides both threadsafe and non-threadsafe implementations of a generic set data structure.
Package set provides both threadsafe and non-threadsafe implementations of a generic set data structure.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL