registry: lint

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
unclejack 2014-10-06 22:34:39 +03:00
parent c47aa21c35
commit 7bfdb6d495
5 changed files with 41 additions and 38 deletions

View file

@ -13,7 +13,7 @@ import (
)
// scans string for api version in the URL path. returns the trimmed hostname, if version found, string and API version.
func scanForApiVersion(hostname string) (string, APIVersion) {
func scanForAPIVersion(hostname string) (string, APIVersion) {
var (
chunks []string
apiVersionStr string
@ -43,7 +43,7 @@ func NewEndpoint(hostname string) (*Endpoint, error) {
if !strings.HasPrefix(hostname, "http") {
hostname = "https://" + hostname
}
trimmedHostname, endpoint.Version = scanForApiVersion(hostname)
trimmedHostname, endpoint.Version = scanForAPIVersion(hostname)
endpoint.URL, err = url.Parse(trimmedHostname)
if err != nil {
return nil, err