Skip to content
sunnyregionPublic

About

基础的golang需要的工具

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Sunny使用的基本一些函数

  • SunnyMd5 : 返回md5
  • SunnyTimeNow : 返回格式化好的字符串,sunnytime返回特殊的字符串
  • SunnyIsNotExist(path string) :如果path不存在创建
  • SunnyJsonToStr :把json变成字符串
  • SunnyTimeNow :返回格式化好的当前字符串 style 是day返回年月日,是time返回2006-01-02 15:04:05
  • SliceIndex:类似python的list.index()方法,找出slice里面是否包含查询的参数 返回值是-1表示没有搜索到。
  • SunnyTypeof:返回数据类型
  • SunnyStr2Time:输入字符串返回时间
  • SunnyCompareTime:比较两个时间大小,lt、eq、gt
  • Jpg2Base64 : jpeg图片转成Base64
  • Base642Image:Base64转成PNG或者JPG

2017/11/07 开始写作

2017/11/16 有新函数添加

2017/11/28 有新函数添加

2018/03/21 有新函数添加

2018/04/26 有新函数添加

About

基础的golang需要的工具

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址