goutils

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

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

goutils

介绍

以 PHP Codeigniter 框架 helper 为蓝本的 go 语言工具包实现

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func If

func If(condition bool, trueVal, falseVal interface{}) interface{}

If 三元运算符

func RandomString

func RandomString(randomType RandomStringType, length int) string

* 生成随机字符串

Types

type RandomStringType

type RandomStringType int32
const (
	RANDOM_TYPE_BASIC   RandomStringType = 0
	RANDOM_TYPE_ALPHA   RandomStringType = 1
	RANDOM_TYPE_ALNUM   RandomStringType = 2
	RANDOM_TYPE_NUMERIC RandomStringType = 3
	RANDOM_TYPE_NOZERO  RandomStringType = 4
	RANDOM_TYPE_MD5     RandomStringType = 5
	RANDOM_TYPE_SHA1    RandomStringType = 6
)

Jump to

Keyboard shortcuts

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