github_hook.go
func (g GithubHook) DoesHandle(h http.Header) bool {
	userAgent := h.Get("User-Agent")

	// GitHub always uses a user-agent like "GitHub-Hookshot/<id>"
	if userAgent != "" && strings.HasPrefix(userAgent, "GitHub-Hookshot") {
		return true
	}
	return false
}
func (g GithubHook) DoesHandle(h http.Header) bool {
	userAgent := h.Get("User-Agent")

	// GitHub always uses a user-agent like "GitHub-Hookshot/<id>"
	if userAgent != "" && strings.HasPrefix(userAgent, "GitHub-Hookshot") {
		return true
	}
	return false
}
func ( g GithubHook ) DoesHandle ( h http . Header ) bool { userAgent := h . Get ( " " ) // GitHub always uses a user-agent like "GitHub-Hookshot/<id>" if userAgent != " " && strings . HasPrefix ( userAgent , " " ) { return true } return false }
// DoesHandle satisfies hookHandler.
DoesHandle satisfies hookHandler .