diff options
author | Unknwon <u@gogs.io> | 2017-03-09 00:03:29 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-09 00:03:29 -0500 |
commit | c93731339f3da01bb1158acc7acf781f0dfe2468 (patch) | |
tree | 7c1d161ab780949e5b84313c85788cc1aa2ac9d4 /vendor/github.com/gogits/go-gogs-client/user.go | |
parent | bab448681d613e3982c46c7bd9ed54319638a3dd (diff) |
webhook: support Issues event (#2319)
Also addresses #3485.
Diffstat (limited to 'vendor/github.com/gogits/go-gogs-client/user.go')
-rw-r--r-- | vendor/github.com/gogits/go-gogs-client/user.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/gogits/go-gogs-client/user.go b/vendor/github.com/gogits/go-gogs-client/user.go index b385b041..3879b1a6 100644 --- a/vendor/github.com/gogits/go-gogs-client/user.go +++ b/vendor/github.com/gogits/go-gogs-client/user.go @@ -18,12 +18,13 @@ type User struct { AvatarUrl string `json:"avatar_url"` } -// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility +// MarshalJSON implements the json.Marshaler interface for User func (u User) MarshalJSON() ([]byte, error) { // Re-declaring User to avoid recursion type shadow User return json.Marshal(struct { shadow + // LEGACY [Gogs 1.0]: remove field(s) for backward compatibility CompatUserName string `json:"username"` }{shadow(u), u.UserName}) } |