diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-03-11 00:30:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-11 00:30:51 +0800 |
commit | 047bf949089c49efa8840aaae533444e86fdbc24 (patch) | |
tree | 6f39531e12275b7665bb40e04c7618c2e4775609 /internal/db/webhook.go | |
parent | 880d0ec19f488001a90b3e370a992eaabac89e70 (diff) |
ci: enable go vet check (#5981)
* ci: enable go vet check
* Improve .travis.yml
Diffstat (limited to 'internal/db/webhook.go')
-rw-r--r-- | internal/db/webhook.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/webhook.go b/internal/db/webhook.go index 96a01971..418f2729 100644 --- a/internal/db/webhook.go +++ b/internal/db/webhook.go @@ -437,10 +437,10 @@ type HookTask struct { func (t *HookTask) BeforeUpdate() { if t.RequestInfo != nil { - t.RequestContent = t.MarshalJSON(t.RequestInfo) + t.RequestContent = t.ToJSON(t.RequestInfo) } if t.ResponseInfo != nil { - t.ResponseContent = t.MarshalJSON(t.ResponseInfo) + t.ResponseContent = t.ToJSON(t.ResponseInfo) } } @@ -472,7 +472,7 @@ func (t *HookTask) AfterSet(colName string, _ xorm.Cell) { } } -func (t *HookTask) MarshalJSON(v interface{}) string { +func (t *HookTask) ToJSON(v interface{}) string { p, err := jsoniter.Marshal(v) if err != nil { log.Error("Marshal [%d]: %v", t.ID, err) |