slices

package
v0.0.0-...-2de8f8b Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSliceIndex

func GetSliceIndex(index int, length int) int

GetSliceIndex returns fixed index based on a given length. It is required if you want to support negative indexing. I want to support it.

Types

type Slice

type Slice struct {
	Start  int
	Finish int
}

Slice is just a pair of start/finish numbers. Used for show command.

func ExtractSlice

func ExtractSlice(single interface{}, start interface{}, finish interface{}) (*Slice, error)

ExtractSlice extracts slice from the given arguments. Please check how show command looks like to get an idea what will it construct.

Jump to

Keyboard shortcuts

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