diff options
Diffstat (limited to 'vendor/github.com/google/go-github/github/users_keys.go')
-rw-r--r-- | vendor/github.com/google/go-github/github/users_keys.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vendor/github.com/google/go-github/github/users_keys.go b/vendor/github.com/google/go-github/github/users_keys.go index dcbd773..e4c255f 100644 --- a/vendor/github.com/google/go-github/github/users_keys.go +++ b/vendor/github.com/google/go-github/github/users_keys.go @@ -9,10 +9,11 @@ import "fmt" // Key represents a public SSH key used to authenticate a user or deploy script. type Key struct { - ID *int `json:"id,omitempty"` - Key *string `json:"key,omitempty"` - URL *string `json:"url,omitempty"` - Title *string `json:"title,omitempty"` + ID *int `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + URL *string `json:"url,omitempty"` + Title *string `json:"title,omitempty"` + ReadOnly *bool `json:"read_only,omitempty"` } func (k Key) String() string { @@ -23,7 +24,7 @@ func (k Key) String() string { // string will fetch keys for the authenticated user. // // GitHub API docs: http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user -func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]Key, *Response, error) { +func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]*Key, *Response, error) { var u string if user != "" { u = fmt.Sprintf("users/%v/keys", user) @@ -40,7 +41,7 @@ func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]Key, *Response return nil, nil, err } - keys := new([]Key) + keys := new([]*Key) resp, err := s.client.Do(req, keys) if err != nil { return nil, resp, err |