diff --git a/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go b/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go index 9d0d2ed1..80dbfa78 100644 --- a/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go +++ b/Godeps/_workspace/src/github.com/dustin/go-humanize/comma.go @@ -33,7 +33,7 @@ func Comma(v int64) string { j-- } parts[j] = strconv.Itoa(int(v)) - return sign + strings.Join(parts[j:len(parts)], ",") + return sign + strings.Join(parts[j:], ",") } // Commaf produces a string form of the given number in base 10 with @@ -97,5 +97,5 @@ func BigComma(b *big.Int) string { j-- } parts[j] = strconv.Itoa(int(b.Int64())) - return sign + strings.Join(parts[j:len(parts)], ",") + return sign + strings.Join(parts[j:], ",") } diff --git a/Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor_windows.go b/Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor_windows.go index 315f44c5..f4938667 100644 --- a/Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor_windows.go +++ b/Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor_windows.go @@ -308,7 +308,7 @@ func (cw *ansiColorWriter) Write(p []byte) (int, error) { } if cw.state == outsideCsiCode { - nw, err = cw.w.Write(p[first:len(p)]) + nw, err = cw.w.Write(p[first:]) } return r + nw + nc, err diff --git a/errors.go b/errors.go index 83e7fcd9..b09b1a8b 100644 --- a/errors.go +++ b/errors.go @@ -19,8 +19,9 @@ package main import "errors" var ( + // TODO remove, unused // fs - errFskey = errors.New("Key is needed to get the file") + // errFskey = errors.New("Key is needed to get the file") // url errEmptyURL = errors.New("URL is empty") @@ -31,8 +32,9 @@ var ( // url errInvalidURL = errors.New("Invalid URL") + // TODO remove, unused // host - errHostname = errors.New("No hostname specified") + // errHostname = errors.New("No hostname specified") // common errInvalidbucket = errors.New("Invalid bucket name") diff --git a/url-parser.go b/url-parser.go index 51587d00..d8812f58 100644 --- a/url-parser.go +++ b/url-parser.go @@ -105,25 +105,6 @@ func fixFileURL(urlStr string) (fixedURL string, err error) { } -// url2Host extracts hostname from the URL. -func url2Host(urlStr string) (host string, err error) { - if urlStr == "" { - return "", iodine.New(errEmptyURL, nil) - } - - utype, e := getURLType(urlStr) - if e != nil || utype != urlFile { - return "", iodine.New(e, nil) - } - - u, e := url.Parse(urlStr) - if e != nil { - return "", iodine.New(e, nil) - } - - return u.Host, nil -} - // url2Object converts URL to bucket and objectname func url2Object(urlStr string) (bucketName, objectName string, err error) { u, err := url.Parse(urlStr)