diff options
author | Thomas Boerger <thomas@webhippie.de> | 2016-11-04 12:29:31 +0100 |
---|---|---|
committer | Thomas Boerger <thomas@webhippie.de> | 2016-11-04 23:45:06 +0100 |
commit | 648c6fdd6045735a603444f0408e18981a334591 (patch) | |
tree | 9c89b0fa4d8dde85e2e79ce44a960bbd3c7ac706 /models/webhook.go | |
parent | f960b776f0d20e93abb033a21d7ba3a8a803828c (diff) | |
download | gitea-648c6fdd6045735a603444f0408e18981a334591.tar.gz gitea-648c6fdd6045735a603444f0408e18981a334591.zip |
Vet complains about "should have signature MarshalJSON() ([]byte, error)", replaced with custom name
Diffstat (limited to 'models/webhook.go')
-rw-r--r-- | models/webhook.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/webhook.go b/models/webhook.go index 534e69135b..bb65dc0965 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -367,10 +367,10 @@ type HookTask struct { func (t *HookTask) BeforeUpdate() { if t.RequestInfo != nil { - t.RequestContent = t.MarshalJSON(t.RequestInfo) + t.RequestContent = t.SimpleMarshalJSON(t.RequestInfo) } if t.ResponseInfo != nil { - t.ResponseContent = t.MarshalJSON(t.ResponseInfo) + t.ResponseContent = t.SimpleMarshalJSON(t.ResponseInfo) } } @@ -402,7 +402,7 @@ func (t *HookTask) AfterSet(colName string, _ xorm.Cell) { } } -func (t *HookTask) MarshalJSON(v interface{}) string { +func (t *HookTask) SimpleMarshalJSON(v interface{}) string { p, err := json.Marshal(v) if err != nil { log.Error(3, "Marshal [%d]: %v", t.ID, err) |