utils

package
v0.0.0-...-045f52c Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitWithMsg

func ExitWithMsg(str string, value ...interface{})

func GetLocale

func GetLocale(context *qor.Context) string

func GetNestedModel

func GetNestedModel(value interface{}, alias string, context *qor.Context) interface{}

func HumanizeString

func HumanizeString(str string) string

Humanize separates string based on capitalizd letters e.g. "OrderItem" -> "Order Item"

func NewValue

func NewValue(t reflect.Type) (v reflect.Value)

func ParseNestedField

func ParseNestedField(value reflect.Value, name string) (reflect.Value, string)

Profile.Name

func ParseTagOption

func ParseTagOption(str string) map[string]string

func PatchURL

func PatchURL(originalURL string, params ...interface{}) (patchedURL string, err error)

PatchURL updates the query part of the current request url. You can access it in template by `patch_url`.

patch_url "google.com" "key" "value"

func Stringify

func Stringify(object interface{}) string

func ToArray

func ToArray(value interface{}) (values []string)

func ToFloat

func ToFloat(value interface{}) float64

func ToInt

func ToInt(value interface{}) int64

func ToParamString

func ToParamString(str string) string

func ToString

func ToString(value interface{}) string

func ToUint

func ToUint(value interface{}) uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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