goutil

package module
v0.0.0-...-82b3d29 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

Golang 工具包

Documentation

Overview

Package goutil 常用工具包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(filePath string, rw http.ResponseWriter) error

DownloadFile 文件下载

func FormatAppVersion

func FormatAppVersion(appVersion, GitCommit, BuildDate string) (string, error)

FormatAppVersion 格式化应用版本信息

func MD5

func MD5(s string) string

MD5 生成MD5摘要

func PanicToError

func PanicToError(f func()) (err error)

PanicToError Panic转换为error

func PrintAppVersion

func PrintAppVersion(appVersion, GitCommit, BuildDate string)

PrintAppVersion 打印应用版本

func RandNumber

func RandNumber(min, max int) int

RandNumber 生成min - max之间的随机数

func WorkDir

func WorkDir() (string, error)

WorkDir 获取程序运行时根目录

Types

This section is empty.

Directories

Path Synopsis
Package httpclient http 客户端
Package httpclient http 客户端

Jump to

Keyboard shortcuts

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