utils

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

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

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 10 Imported by: 0

README

goutils

Utility functions for GoLang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(file_name string) bool

func FilesInDirectory

func FilesInDirectory(root string) ([]string, error)

func IntInSlice

func IntInSlice(a int, list []int) bool

intInSlice checks if int is in a slice.

func NewUUID

func NewUUID() (string, error)

NewUUID generates and returns a uuid

func ObjectKeys

func ObjectKeys(data map[string]interface{}) []string

func RandomString

func RandomString(n int) string

newJobId generates and returns an job_id of desired length

func SliceIndex

func SliceIndex(limit int, predicate func(i int) bool) int

SliceIndex returns index of an item in a slice

func StrIsFloat

func StrIsFloat(text string) bool

strIsFloat checks if string cam be parsed as a float

func StrIsInt

func StrIsInt(text string) bool

strIsInt checks if string can be parsed as an integer

func StringInSlice

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

StringInSlice checks slice for occurance of a string

func WalkFilesInDirectory

func WalkFilesInDirectory(root string) ([]string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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