dsutils

package module
v0.0.0-...-3bce17e Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 3 Imported by: 1

README

dsutils

Golang Data Structure utilities

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, e string) bool

func LinesToArray

func LinesToArray(lines string) ([]string, error)

func ReverseArray

func ReverseArray(lines []string) []string

func Trunc

func Trunc(str string, num int) string

func Unique

func Unique(intSlice []string) []string

Types

type Element

type Element struct {
	// contains filtered or unexported fields
}

type TTLCollection

type TTLCollection struct {
	Items      []Element
	TtlSeconds float32
}

func NewTTLCollection

func NewTTLCollection(ttlSeconds0 float32) TTLCollection

func (*TTLCollection) Add

func (c *TTLCollection) Add(element interface{})

func (*TTLCollection) List

func (c *TTLCollection) List() []interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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