This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit d5d355513482f1abfbafc34471d19974c8900d67 Author: lburgazzoli <[email protected]> AuthorDate: Wed Jun 10 12:50:45 2020 +0200 chore(lint): fix findings --- pkg/cmd/util_getter.go | 14 +++++++------- pkg/trait/jvm.go | 6 ++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pkg/cmd/util_getter.go b/pkg/cmd/util_getter.go index f472396..4be7526 100644 --- a/pkg/cmd/util_getter.go +++ b/pkg/cmd/util_getter.go @@ -29,8 +29,8 @@ var Getters map[string]Getter func init() { Getters = map[string]Getter{ - "http": HttpGetter{}, - "https": HttpGetter{}, + "http": HTTPGetter{}, + "https": HTTPGetter{}, "github": GitHubGetter{}, } } @@ -41,14 +41,14 @@ type Getter interface { // A simple getter that retrieves the content of an integration from an // http(s) endpoint. -type HttpGetter struct { +type HTTPGetter struct { } -func (g HttpGetter) Get(u *url.URL) ([]byte, error) { +func (g HTTPGetter) Get(u *url.URL) ([]byte, error) { return g.doGet(u.String()) } -func (g HttpGetter) doGet(source string) ([]byte, error) { +func (g HTTPGetter) doGet(source string) ([]byte, error) { // nolint: gosec resp, err := http.Get(source) if err != nil { @@ -73,7 +73,7 @@ func (g HttpGetter) doGet(source string) ([]byte, error) { // A simple getter that retrieves the content of an integration from // a GitHub endpoint using a RAW endpoint. type GitHubGetter struct { - HttpGetter + HTTPGetter } func (g GitHubGetter) Get(u *url.URL) ([]byte, error) { @@ -92,5 +92,5 @@ func (g GitHubGetter) Get(u *url.URL) ([]byte, error) { srcURL := fmt.Sprintf("https://raw.githubusercontent.com/%s/%s/%s/%s", items[1], items[2], branch, items[3]) - return g.HttpGetter.doGet(srcURL) + return g.HTTPGetter.doGet(srcURL) } diff --git a/pkg/trait/jvm.go b/pkg/trait/jvm.go index f7b4acb..9aaa23b 100644 --- a/pkg/trait/jvm.go +++ b/pkg/trait/jvm.go @@ -22,8 +22,6 @@ import ( "sort" "strings" - "gopkg.in/inf.v0" - "github.com/pkg/errors" "github.com/scylladb/go-set/strset" @@ -44,12 +42,12 @@ type jvmTrait struct { Debug bool `property:"debug"` // Suspends the target JVM immediately before the main class is loaded DebugSuspend bool `property:"debug-suspend"` + // Prints the command used the start the JVM in the container logs (default `true`) + PrintCommand bool `property:"print-command"` // Transport address at which to listen for the newly launched JVM (default `*:5005`) DebugAddress string `property:"debug-address"` // A comma-separated list of JVM options Options *string `property:"options"` - // Prints the command used the start the JVM in the container logs (default `true`) - PrintCommand bool `property:"print-command"` } func newJvmTrait() Trait {
