func (s *RepositoriesService) ListCollaborators(ctx context.Context, owner, repo string, opt *ListCollaboratorsOptions) ([]*User, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/collaborators", 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
	}
	req.Header.Set("Accept", mediaTypeNestedTeamsPreview)
	var users []*User
	resp, err := s.client.Do(ctx, req, &users)
	if err != nil {
		return nil, resp, err
	}
	return users, resp, nil
}
ListCollaborators lists the GitHub users that have access to the repository.

GitHub API docs: https://developer.github.com/v3/repos/collaborators/#list-collaborators
package github
import (
	"context"
	"fmt"
)
type ListCollaboratorsOptions struct {
	Affiliation string `url:"affiliation,omitempty"`
	ListOptions
}