util

package
v0.0.0-...-9ed695e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package util contains utility functions that are used in dirrent places of the codebase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddExtraSpaceIfExist

func AddExtraSpaceIfExist(str string) string

AddExtraSpaceIfExist adds an extra space at the beginning of the string if the string is not empty.

func GetInterfaceAsSQL

func GetInterfaceAsSQL(value interface{}) (string, error)

GetInterfaceAsSQL returns sql value representation of the value.

func IsBlank

func IsBlank(value reflect.Value) bool

IsBlank returns true if the value represent a zero value of the specified valut ype.

func ToDBName

func ToDBName(name string) string

ToDBName convert string to db name

func ToSearchableMap

func ToSearchableMap(attrs ...interface{}) (result interface{})

ToSearchableMap transform attrs to a map.

func WrapTX

func WrapTX(tx string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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