mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-07-21 02:29:04 +00:00
fixed README.md and flags.go
This commit is contained in:
parent
cb53959f13
commit
97fd236911
@ -52,7 +52,7 @@ $ kubens not-found-namespace --force
|
|||||||
Context "test" set.
|
Context "test" set.
|
||||||
Active namespace is "not-found-namespace".
|
Active namespace is "not-found-namespace".
|
||||||
---
|
---
|
||||||
$ kubens not-found-namespace --f
|
$ kubens not-found-namespace -f
|
||||||
Context "test" set.
|
Context "test" set.
|
||||||
Active namespace is "not-found-namespace".
|
Active namespace is "not-found-namespace".
|
||||||
```
|
```
|
||||||
|
@ -18,6 +18,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||||
@ -47,7 +48,7 @@ func parseArgs(argv []string) Op {
|
|||||||
force := false
|
force := false
|
||||||
|
|
||||||
if n == 2 {
|
if n == 2 {
|
||||||
force = argv[1] == "--force" || argv[1] == "-f"
|
force = slices.Contains([]string{"-f", "--force"}, argv[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
if v == "--help" || v == "-h" {
|
if v == "--help" || v == "-h" {
|
||||||
|
Loading…
Reference in New Issue
Block a user