Removed http.Handler interface

Including this added 60KB to the compiled library which I do not think
is worth it just to include a helper function consisting of about 4
lines of code.
This commit is contained in:
Bruce Marriner
2016-06-01 16:58:13 -05:00
parent bdcd2f75e6
commit 0fdfe21511
2 changed files with 0 additions and 16 deletions

View File

@@ -4,7 +4,6 @@ package snowflake
import (
"encoding/base64"
"fmt"
"net/http"
"strconv"
"strings"
"sync"
@@ -86,15 +85,6 @@ func (n *Node) Generate() (ID, error) {
), nil
}
func (n *Node) ServeHTTP(w http.ResponseWriter, r *http.Request) {
id, err := n.Generate()
if err != nil {
http.Error(w, "Internal Error", 500)
}
fmt.Fprint(w, id)
}
// Int64 returns an int64 of the snowflake ID
func (f ID) Int64() int64 {
return int64(f)