utils

package module
v0.0.0-...-f91fb9b Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2015 License: MIT Imports: 7 Imported by: 2

README

goutils

Documentation

Index

Constants

View Source
const (
	MaxUintConst = ^uint(0)
	MinUintConst = 0
	MaxIntConst  = int(MaxUintConst >> 1)
	MinIntConst  = -MaxIntConst - 1
)

Variables

This section is empty.

Functions

func MakeSliceInt

func MakeSliceInt(min, max, increment int) []int

func MaxInt

func MaxInt(x, y int) int

func MaxIntSlice

func MaxIntSlice(s []int) int

func MinInt

func MinInt(x, y int) int

func MinIntSlice

func MinIntSlice(s []int) int

func ReadCsv

func ReadCsv(path string, c chan []string, screenBlank bool, delimiter rune) error

- Reads csv file from path. Returns error if any. - Passes records on to provided channel. - Will screen blank records if screenBlank set to true. May come at slight performance hit. rows x cols: O(rows) ==> O(rows x cols)

Types

type LinkPreview

type LinkPreview struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	ImageUrl    string `json:"image_url"` // TODO
}
func ParseLink(url string) (*LinkPreview, error)

Jump to

Keyboard shortcuts

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