fixed README.md and flags.go

This commit is contained in:
Suleiman Dibirov 2024-06-24 21:02:26 +03:00
parent cb53959f13
commit 97fd236911
2 changed files with 3 additions and 2 deletions

View File

@ -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".
```

View File

@ -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" {