Browse Source

Vet complains about "should have signature MarshalJSON() ([]byte, error)", replaced with custom name

for-closed-social
Thomas Boerger 8 years ago
parent
commit
648c6fdd60
No known key found for this signature in database GPG Key ID: 5A388F55283960B6
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      models/webhook.go

+ 3
- 3
models/webhook.go View File

@ -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)

Loading…
Cancel
Save