No longer used function

This commit is contained in:
Joachim Hill-Grannec 2016-07-24 17:06:44 -07:00
parent df8f9de33d
commit 5b52ef924f

View file

@ -2,8 +2,6 @@ package internal
import (
"bytes"
"crypto/md5"
"encoding/hex"
"encoding/json"
"fmt"
log "github.com/Sirupsen/logrus"
@ -11,7 +9,6 @@ import (
"github.com/mrjones/oauth"
"io/ioutil"
"net/http"
"strings"
)
const (
@ -159,15 +156,6 @@ func (c *Client) DeleteHook(owner string, name string, link string) error {
return c.doDelete(fmt.Sprintf(pathHookEnabled, c.base, owner, name, hookName))
}
func avatarLink(email string) (url string) {
hasher := md5.New()
hasher.Write([]byte(strings.ToLower(email)))
emailHash := fmt.Sprintf("%v", hex.EncodeToString(hasher.Sum(nil)))
avatarURL := fmt.Sprintf("https://www.gravatar.com/avatar/%s.jpg", emailHash)
log.Debug(avatarURL)
return avatarURL
}
//Helper function to help create the hook
func (c *Client) doPut(url string, body []byte) error {
request, err := http.NewRequest("PUT", url, bytes.NewBuffer(body))