helper

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ASINReg, _ = regexp.Compile("[A-Za-z0-9]{10}")

ASINReg matches a ASIN

View Source
var CartItemIDReg, _ = regexp.Compile("[A-Za-z0-9]{14}")

CartItemIDReg matches a cart item ID

View Source
var NumericReg, _ = regexp.Compile("[0-9]+")

NumericReg matches a numeric string

Functions

func FormatRating

func FormatRating(rating float64) string

FormatRating formats a numeric rating to a string

func FormatText added in v0.1.2

func FormatText(str string, cap int, prepend string) string

FormatText prints pretty text

func IsASIN

func IsASIN(str string) bool

IsASIN checks wether str is an ASIN

func IsCartItemID added in v0.1.2

func IsCartItemID(str string) bool

IsCartItemID checks wether str is a cart item ID

func IsNumeric

func IsNumeric(str string) bool

IsNumeric checks wether str is numeric

func Rating

func Rating(asin string, locale string) (float64, error)

Rating returns the rating for a asin in a specific locale

Types

This section is empty.

Jump to

Keyboard shortcuts

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