func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateProjectSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/snippets", pathEscape(project))
	req, err := s.client.NewRequest("POST", u, opt, options)
	if err != nil {
		return nil, nil, err
	}
	ps := new(Snippet)
	resp, err := s.client.Do(req, ps)
	if err != nil {
		return nil, resp, err
	}
	return ps, resp, err
}
CreateSnippet creates a new project snippet. The user must have permission
to create new snippets.

GitLab API docs:
https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet
package gitlab
import (
	"bytes"
	"fmt"
)
type ProjectSnippetsService struct {
	client *Client
}
type ListProjectSnippetsOptions ListOptions
func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListProjectSnippetsOptions, options ...OptionFunc) ([]*Snippet, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/snippets", pathEscape(project))
	req, err := s.client.NewRequest("GET", u, opt, options)
	if err != nil {
		return nil, nil, err
	}
	var ps []*Snippet
	resp, err := s.client.Do(req, &ps)
	if err != nil {
		return nil, resp, err
	}
	return ps, resp, err
}
func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Snippet, *Response, error) {
	project, err := parseID(pid)
	if err != nil {
		return nil, nil, err
	}
	u := fmt.Sprintf("projects/%s/snippets/%d", pathEscape(project), snippet)
	req, err := s.client.NewRequest("GET", u, nil, options)
	if err != nil {
		return nil, nil, err
	}
	ps := new(Snippet)
	resp, err := s.client.Do(req, ps)
	if err != nil {
		return nil, resp, err
	}
	return ps, resp, err
}
type CreateProjectSnippetOptions struct {
	Title       *string          `url:"title,omitempty" json:"title,omitempty"`
	FileName    *string          `url:"file_name,omitempty" json:"file_name,omitempty"`
	Description *string          `url:"description,omitempty" json:"description,omitempty"`
	Code        *string          `url:"code,omitempty" json:"code,omitempty"`
	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
}