Merge pull request #371 from technosophos/fix/style-fixes
fix(test-style): fix formatting and comments
This commit is contained in:
commit
d61ba060cb
5 files changed
+9
-8
No files matched your search
@@ -77,6 +77,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.
|
||||
|
||||
@@ -34,10 +34,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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user