Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
数据应用
GoLibrary
提交
7a0ace4c
G
GoLibrary
项目概览
数据应用
/
GoLibrary
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
GoLibrary
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7a0ace4c
编写于
6月 04, 2021
作者:
李
李光春
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复代码
上级
4719f211
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
5 deletion
+33
-5
CHANGELOG.md
CHANGELOG.md
+2
-1
helper/http/http.go
helper/http/http.go
+1
-1
helper/string/string.go
helper/string/string.go
+13
-0
helper/time/time.go
helper/time/time.go
+14
-0
service/ddk/Ddk.go
service/ddk/Ddk.go
+1
-1
service/jdk/Jdk.go
service/jdk/Jdk.go
+1
-1
service/tbk/Tbk.go
service/tbk/Tbk.go
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
7a0ace4c
## v1.0.1
3
/ 2021-06-04
## v1.0.1
4
/ 2021-06-04
-
优化
-
增加go.mod
-
修复代码
## v1.0.11 / 2021-05-31
...
...
helper/http/http.go
浏览文件 @
7a0ace4c
...
...
@@ -3,7 +3,7 @@ package http
import
(
"encoding/json"
"github.com/bitly/go-simplejson"
"github.com/dtapps/
GoL
ibrary/helper/request"
"github.com/dtapps/
go-l
ibrary/helper/request"
"gopkg.in/h2non/gentleman.v2"
"gopkg.in/h2non/gentleman.v2/plugins/body"
)
...
...
helper/string/string.go
0 → 100644
浏览文件 @
7a0ace4c
package
string
import
(
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
)
func
HmacSha256Hex
(
key
,
strToSign
string
)
string
{
hasher
:=
hmac
.
New
(
sha256
.
New
,
[]
byte
(
key
))
hasher
.
Write
([]
byte
(
strToSign
))
return
hex
.
EncodeToString
(
hasher
.
Sum
(
nil
))
}
helper/time/time.go
浏览文件 @
7a0ace4c
...
...
@@ -2,6 +2,15 @@ package time
import
"time"
const
(
RFC822Format
=
"Mon, 02 Jan 2006 15:04:05 MST"
ISO8601Format
=
"2006-01-02T15:04:05Z"
)
func
NowUTCSeconds
()
int64
{
return
time
.
Now
()
.
UTC
()
.
Unix
()
}
func
NowUTCNanoSeconds
()
int64
{
return
time
.
Now
()
.
UTC
()
.
UnixNano
()
}
// GetCurrentDate 获取当前的时间 - 字符串
func
GetCurrentDate
()
string
{
return
time
.
Now
()
.
Format
(
"2006/01/02 15:04:05"
)
...
...
@@ -26,3 +35,8 @@ func GetCurrentNanoUnix() int64 {
func
GetCurrentWjDate
()
string
{
return
time
.
Now
()
.
Format
(
"20060102"
)
}
func
FormatISO8601Date
(
timestamp_second
int64
)
string
{
tm
:=
time
.
Unix
(
timestamp_second
,
0
)
.
UTC
()
return
tm
.
Format
(
ISO8601Format
)
}
service/ddk/Ddk.go
浏览文件 @
7a0ace4c
...
...
@@ -8,7 +8,7 @@ import (
"errors"
"fmt"
"github.com/bitly/go-simplejson"
"github.com/dtapps/
GoL
ibrary/service"
"github.com/dtapps/
go-l
ibrary/service"
"github.com/nilorg/sdk/convert"
"io"
"io/ioutil"
...
...
service/jdk/Jdk.go
浏览文件 @
7a0ace4c
...
...
@@ -8,7 +8,7 @@ import (
"errors"
"fmt"
"github.com/bitly/go-simplejson"
"github.com/dtapps/
GoL
ibrary/service"
"github.com/dtapps/
go-l
ibrary/service"
"github.com/nilorg/sdk/convert"
"io"
"io/ioutil"
...
...
service/tbk/Tbk.go
浏览文件 @
7a0ace4c
...
...
@@ -8,7 +8,7 @@ import (
"errors"
"fmt"
"github.com/bitly/go-simplejson"
"github.com/dtapps/
GoL
ibrary/service"
"github.com/dtapps/
go-l
ibrary/service"
"github.com/nilorg/sdk/convert"
"io"
"io/ioutil"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录