Commit Graph

6 Commits

Author SHA1 Message Date
Toshinori Sugita 699ac5e7cb fix lint errors (#388)
* fix typo (misspell)

* ineffectual assignment to err (ineffassign)

* if block ends with a return statement, so drop this else and outdent its block (golint)

* should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)

* struct field LogHttp should be LogHTTP (golint)

* fix last typo
2019-08-24 22:46:13 -07:00
Doug Davis 74b3e10f76 Add support for -A variant of --all-namespaces (#356)
* Add support for -A variant of --all-namespaces

-A is my newest favorite kubectl flag, it's so much easier/faster to type
than --all-namespaces. kn users should benefit from it too!

Signed-off-by: Doug Davis <dug@us.ibm.com>

* tweak tests

Signed-off-by: Doug Davis <dug@us.ibm.com>
2019-08-09 07:01:05 -07:00
Roland Huß 98184eafbc refactor(serving): KnClient interface for single point of cluster access (#134)
* fix(serving): Remove hardcoded GVK and look it up from schema

Fixes #133.

* chore(serving): Add test for "WaitForService()"

* refactor(service): Add listRoutes() to client + generic way for list options

* chore(serving): Fixing rebase conflicts
2019-07-08 10:08:34 -07:00
Roland Huß a60d273d82 feat(build.sh): Enable goimports + cleanup imports in source files (#186)
* feat(build.sh): Enable goimports for cleanup imports + cleanup imports

Much like 'go fmt' for cleaning up go source, 'goimports' can help
in properly formatting and grouping imports. See https://goinbigdata.com/goimports-vs-gofmt/
for a quick overview.

This commit also cleansup imports on existing files.

* fix(build): Add missing space for output on iterm

* chore(build): Merged gofmt and goimports

And changed order so that formatting and import reordering comes
before compiling and testing
2019-06-28 06:30:08 -07:00
Kenjiro Nakayama 13ff277095 Set current namespace from kubeconfig by default (#172)
* Set current namespace from kubeconfig by default

Currently kn command does not pick up namespace from kubeconfig but
hardcorded default namespace.

This patch fixes to get namespace from kubeconfig.

Fixes https://github.com/knative/client/issues/7

* Use NamespaceFactory to get current namespace

* Update unit tests

* Add nil check for ClientConfig
2019-06-24 11:23:05 -07:00
Navid Shaikh ba59ad8b9a Fix returning the namespace for listing resources (#88)
* Fix returning the namespace for listing resources

 Fixes #86

* Adds license to pkg/kn/commands/namespaced.go

* Adds tests for namespace flags and retrieval

* Renames test function
2019-05-09 15:55:38 -07:00