mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-07-19 01:27:45 +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.
|
||||
Active namespace is "not-found-namespace".
|
||||
---
|
||||
$ kubens not-found-namespace --f
|
||||
$ kubens not-found-namespace -f
|
||||
Context "test" set.
|
||||
Active namespace is "not-found-namespace".
|
||||
```
|
||||
|
@ -18,6 +18,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
@ -47,7 +48,7 @@ func parseArgs(argv []string) Op {
|
||||
force := false
|
||||
|
||||
if n == 2 {
|
||||
force = argv[1] == "--force" || argv[1] == "-f"
|
||||
force = slices.Contains([]string{"-f", "--force"}, argv[1])
|
||||
}
|
||||
|
||||
if v == "--help" || v == "-h" {
|
||||
|
Loading…
Reference in New Issue
Block a user