tools

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2018 License: BSD-3-Clause Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString() (randomString string, err error)

func RenderTemplate

func RenderTemplate(templateName string, data interface{}) (message string, err error)

Types

type TranslationValues added in v1.0.0

type TranslationValues map[string]interface{}

TranslationValues is a map, with the keys beign the requested translations, and the values being a struct with the values to use in the template of said translation

type Translations added in v1.0.0

type Translations map[string]string

Translations map the requested keys to their final rendered values

func ParseTranslations added in v1.0.0

func ParseTranslations(rawKey string, tv TranslationValues) (translations Translations, err error)

Parse translations loads the translation templates and renders them with the provided values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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