func (s *LicensesService) List() ([]License, *Response, error) {
	req, err := s.client.NewRequest("GET", "licenses", nil)
	if err != nil {
		return nil, nil, err
	}
	req.Header.Set("Accept", mediaTypeLicensesPreview)
	licenses := new([]License)
	resp, err := s.client.Do(req, licenses)
	if err != nil {
		return nil, resp, err
	}
	return *licenses, resp, err
}
List popular open source licenses.

GitHub API docs: https://developer.github.com/v3/licenses/#list-all-licenses
package github
import "fmt"
type LicensesService struct {
	client *Client
}
type License struct {
	Key  *string `json:"key,omitempty"`
	Name *string `json:"name,omitempty"`
	URL  *string `json:"url,omitempty"`
	HTMLURL        *string   `json:"html_url,omitempty"`
	Featured       *bool     `json:"featured,omitempty"`
	Description    *string   `json:"description,omitempty"`
	Category       *string   `json:"category,omitempty"`
	Implementation *string   `json:"implementation,omitempty"`
	Required       *[]string `json:"required,omitempty"`
	Permitted      *[]string `json:"permitted,omitempty"`
	Forbidden      *[]string `json:"forbidden,omitempty"`
	Body           *string   `json:"body,omitempty"`
}
func (l License) String() string {
	return Stringify(l)
}