tools

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 12 Imported by: 0

README

Go Report Card GoDoc GolangCI

xmodules/tools for Xamboo - GO

The tools package give some standard functions

  • UUID() string,
  • MD5(string)string,
  • CreateKey(length, type) string
  • Messages selection for modules with languages

Version Changes Control

v0.0.1 - 2021-01-15

  • Add language support for message selection

v0.0.0 - 2020-04-20

  • First release

Manual:

I. Tools

Intro


  1. Overview

Example:

import "github.com/webability-go/xmodules/tools"


  1. Reference

To use the package:

import "github.com/webability-go/xmodules/tools"

Documentation

Index

Constants

This section is empty.

Variables

Language is the default system language to search messages in this language in priority It may be changed by the code at anytime. Recommended to change it to your language when you init your libraries

Functions

func BuildConfigSet

func BuildConfigSet(config *xconfig.XConfig) xcore.XDataset

func BuildMessages

func BuildMessages(data map[language.Tag]map[string]string) *map[language.Tag]*xcore.XLanguage

func CreateKey

func CreateKey(length int, chartype int) string

Creates a string of random chars and digits of length

chartype = -1: lowers, uppers and digits
chartype = 0: only digits
chartype = 1 only uppers
chartype = 2 only lowers

func GetMD5Hash

func GetMD5Hash(text string) string

func Message

func Message(messages *map[language.Tag]*xcore.XLanguage, id string, params ...interface{}) string

func UUID

func UUID() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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