mirror of
https://github.com/gfleury/go-bitbucket-v1.git
synced 2025-04-04 08:50:13 -05:00
Merge pull request #60 from louisphilippereid/get-projects-response
Added GetProjectsResponse to unmarshall get projects response
This commit is contained in:
commit
6e30c5760c
@ -561,6 +561,12 @@ func (k *SSHKey) String() string {
|
||||
return strings.Join(parts, " ")
|
||||
}
|
||||
|
||||
func GetProjectsResponse(r *APIResponse) ([]Project, error) {
|
||||
var m []Project
|
||||
err := mapstructure.Decode(r.Values["values"], &m)
|
||||
return m, err
|
||||
}
|
||||
|
||||
// GetCommitsResponse cast Commits into structure
|
||||
func GetCommitsResponse(r *APIResponse) ([]Commit, error) {
|
||||
var m []Commit
|
||||
|
Loading…
x
Reference in New Issue
Block a user