code: func (s *GitService) ListRefs(ctx context.Context, owner, repo string, opt *ReferenceListOptions) ([]*Reference, *Response, error) {
  	var u string
  	if opt != nil && opt.Type != "" {
  		u = fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, opt.Type)
  	} else {
  		u = fmt.Sprintf("repos/%v/%v/git/refs", owner, repo)
  	}
  	u, err := addOptions(u, opt)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	req, err := s.client.NewRequest("GET", u, nil)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	var rs []*Reference
  	resp, err := s.client.Do(ctx, req, &rs)
  	if err != nil {
  		return nil, resp, err
  	}
  
  	return rs, resp, nil
  }
docs: // ListRefs lists all refs in a repository.
  //
  // GitHub API docs: https://developer.github.com/v3/git/refs/#get-all-references