func newProject(projectName string) (p *project, err error) {
	matches := reGithubProject.FindStringSubmatch(projectName)
	if len(matches) < 2 {
		err = fmt.Errorf("bad project name: %s", projectName)
		return
	}
	p = &project{
		owner: matches[1],
		repo:  matches[2],
		path:  matches[4],
		ref:   matches[6],
	}
	if len(p.path) > 0 && p.path[len(p.path)-1] != '/' {
		p.path = p.path + "/"
	}
	if reSemver.MatchString(p.ref) {
		p.ref = "tags/" + p.ref
	}
	err = verifyRef(p.ref)
	return
}
newProject parses project name into the different components
it is composed of.
package githubfs
import (
	"errors"
	"fmt"
	"regexp"
	"strings"
)
var (
	reGithubProject = regexp.MustCompile(`^github\.com/([^@/]+)/([^@/]+)(/([^@]*))?(@([^#]+))?$`)
	reSemver        = regexp.MustCompile(`^v?\d+(\.\d+){0,2}$`)
)
type project struct {
	owner string
	repo  string
	ref   string
	path  string
}