fix(test-style): fix formatting and comments

This fixes a number of formatting and style issues.

Closes #370
pull/371/head
Matt Butcher 9 years ago
parent 187f6e05f2
commit c849c7059e

@ -78,6 +78,7 @@ func run(c *cli.Context, f func(c *cli.Context) error) {
}
}
// NewClient creates a new client instance preconfigured for CLI usage.
func NewClient(c *cli.Context) *client.Client {
host := c.GlobalString("host")
debug := c.GlobalBool("debug")

@ -17,9 +17,6 @@ limitations under the License.
package main
import (
"github.com/kubernetes/deployment-manager/pkg/util"
"github.com/kubernetes/deployment-manager/pkg/version"
"flag"
"fmt"
"log"
@ -28,6 +25,8 @@ import (
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/kubernetes/deployment-manager/pkg/util"
"github.com/kubernetes/deployment-manager/pkg/version"
)
// Route defines a routing table entry to be registered with gorilla/mux.

@ -32,10 +32,10 @@ import (
"github.com/kubernetes/deployment-manager/pkg/common"
)
// The default HTTP timeout
// DefaultHTTPTimeout is the default HTTP timeout.
var DefaultHTTPTimeout = time.Second * 10
// The default HTTP Protocol
// DefaultHTTPProtocol is the default HTTP Protocol (http, https).
var DefaultHTTPProtocol = "http"
// Client is a DM client.

@ -280,13 +280,13 @@ func (gcsrp gcsRegistryProvider) createGCSClient(credentialName string) (*http.C
return config.Client(oauth2.NoContext), nil
}
// RE for a registry type that does support versions and has collections.
// TemplateRegistryMatcher is an RE for a registry type that does support versions and has collections.
var TemplateRegistryMatcher = regexp.MustCompile("github.com/(.*)/(.*)/(.*)/(.*):(.*)")
// RE for a registry type that does not support versions and does not have collections.
// PackageRegistryMatcher is an RE for a registry type that does not support versions and does not have collections.
var PackageRegistryMatcher = regexp.MustCompile("github.com/(.*)/(.*)/(.*)")
// RE for GCS storage
// GCSRegistryMatcher is an RE for GCS storage
var GCSRegistryMatcher = regexp.MustCompile("gs://(.*)/(.*)")
// IsGithubShortType returns whether a given type is a type description in a short format to a github repository type.

@ -114,6 +114,7 @@ func TestHandlerWithURL(handler http.Handler, method, urlString string) (*httpte
return NewHandlerTester(handler).TestWithURL(method, urlString)
}
// LogHandlerText logs a line of text for a handler.
func LogHandlerText(handler string, v string) {
log.Printf("%s: %s\n", handler, v)
}

Loading…
Cancel
Save