common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2017 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

View Source
const AccAPIURL string = "https://accapi.appbase.io" // "http://localhost:3000"

AccAPIURL holds the url of Accounts API

View Source
const DevBuild = false

DevBuild is true if the build is for development

Variables

This section is empty.

Functions

func ColonPad

func ColonPad(text string, length int) string

ColonPad pads spaces after colon

func GetKeyForValue

func GetKeyForValue(data map[string]string, val string) string

GetKeyForValue returns key for the given value

func IsFileValid

func IsFileValid(file string) error

IsFileValid check if the file is valid

func JSONNumberToInt

func JSONNumberToInt(number json.Number) int64

JSONNumberToInt ...

func JSONNumberToString

func JSONNumberToString(number json.Number) string

JSONNumberToString converts a json.Number to string, properly i.e. no decimal points for a integer json.Number is required instead of normal types in map[..].. based decoding

func Max

func Max(a, b int) int

Max function

func OpenURL

func OpenURL(url string) error

OpenURL opens the specified URL in the default browser of the user. https://stackoverflow.com/a/39324149/2295672

func RemoveDuplicates

func RemoveDuplicates(xs *[]string)

RemoveDuplicates removes duplicate values in a slice https://groups.google.com/forum/#!topic/golang-nuts/-pqkICuokio

func SizeInKB

func SizeInKB(size int) int

SizeInKB shows size in KB

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice checks if string is in list or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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