Documentation ¶
Overview ¶
*
- @Time : 2020-04-26 17:38
- @Author : MassAdobe
- @Description: 基本服务工具类
*
Index ¶
- Constants
- func ExternalIP() (net.IP, error)
- func GetIntranetIp() string
- func GetRequestUrlParams(uri string) string
- func Marshal(pojo interface{}) string
- func Md5(str string) string
- func RandCodeSeq() string
- func RandInt(min, max int) int
- func RandInt64(min, max int64) int64
- func RandSeq(n int) string
- func RandomTimestampMark() string
- func RtnCurTime() string
- func RtnTmString() (timsStr string)
- func RunInLinuxWithErr(cmd string) (string, error)
Constants ¶
View Source
const ( TimeFormatMS = "2006-01-02 15:04:05" TimeFormatMonth = "2006-01-02" )
*
- @Author: MassAdobe
- @TIME: 2020/12/17 3:35 下午
- @Description: 常量池
*
Variables ¶
This section is empty.
Functions ¶
func GetIntranetIp ¶
func GetIntranetIp() string
*
- @Author: MassAdobe
- @TIME: 2020-04-26 21:13
- @Description: 获取当前IP地址
*
func GetRequestUrlParams ¶
*
- @Author: MassAdobe
- @TIME: 2020/12/21 10:53 上午
- @Description: 获取请求url上的所有参数
*
func Marshal ¶
func Marshal(pojo interface{}) string
*
- @Author: MassAdobe
- @TIME: 2020-04-27 21:19
- @Description: 转化结构体为JSON字符串
*
func RandCodeSeq ¶
func RandCodeSeq() string
*
- @Author: MassAdobe
- @TIME: 2020-05-29 21:47
- @Description: 生成手机验证码
*
func RandomTimestampMark ¶
func RandomTimestampMark() string
*
- @Author: MassAdobe
- @TIME: 2020/12/17 6:55 下午
- @Description: 生成随机时间戳标志位
*
func RtnCurTime ¶
func RtnCurTime() string
*
- @Author: MassAdobe
- @TIME: 2020/12/17 4:54 下午
- @Description: 返回当前时间戳
*
func RtnTmString ¶
func RtnTmString() (timsStr string)
*
- @Author: MassAdobe
- @TIME: 2020-04-26 21:13
- @Description: 返回时间字符串
*
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.