Categorygithub.com/timob/sindex
modulepackage
0.0.0-20201206080312-1eedde862709
Repository: https://github.com/timob/sindex.git
Documentation: pkg.go.dev

# README

SIndex

Slice Indexing library for Golang.

Documentation

https://godoc.org/github.com/timob/sindex

Example

func ExampleList() {
	bytes := []byte("helloworld")
	bl := NewList(&bytes)
	bytes[bl.Insert(5)] = ' '
	bytes[bl.Append()] = '!'

	fmt.Println(string(bytes))

	for iter := bl.Iterator(0); iter.Next(); {
		fmt.Print(string(bytes[iter.Pos()]))
	}
	// Output:
	// hello world!
	// hello world!
}

Projects using this library

# Packages

print command line arguments in the order they were given removing duplicates.

# Functions

Initializes a struct that promotes a List and also has a slice field.
Returns a new List that manages the slice pointed to by slicePointer.

# Structs

Common List type.
Common List type.
Common List type.
Maps list positions directly to slice indexes.
No description provided by the author
Common List type.

# Interfaces

Implementations provide this interface to access the slice.
An iterator iterates over a list and is able to modify the list.
List satisfies this interface.
No description provided by the author