tools

package
v0.0.0-...-1a281b6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

工具

Index

Constants

View Source
const (
	//生成sql用到的主键标记
	GEN_SQL_IDENTIFY = "_identify"
)

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(src []byte) ([]byte, error)

func Base64Encode

func Base64Encode(src []byte) []byte

func Compare

func Compare(t1, t2 int) bool

两个数值比较 t1>t2

func CurrentDir

func CurrentDir() (string, error)

获得当前路径

func Exist

func Exist(filename string) bool

判断文件是否存在

func IsBlank

func IsBlank(s string) bool

判断空

func IsNotBlank

func IsNotBlank(s string) bool

判断不是空

func Lower

func Lower(v string) string

转换小写

func MapToSQL_Insert

func MapToSQL_Insert(data map[string]string, table string) (string, []interface{})

map转sql insert 当data map某个value值为identify时,标记它为主键标识生成一个id data数据 table表名

func ParseInteger

func ParseInteger(v string) int

转换为int

func SimilarDegree

func SimilarDegree(str1, str2 string) float64

两个字符串相似度比较

func Sleep

func Sleep(sleep int)

休眠

func TimePoor

func TimePoor(t string, second int) bool

计算当前时间和t时间在second秒之内 t 比较的时间,second 符合多少秒内

func Upper

func Upper(v string) string

转换大写

Types

This section is empty.

Directories

Path Synopsis
Package cron implements a cron spec parser and job runner.
Package cron implements a cron spec parser and job runner.

Jump to

Keyboard shortcuts

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