You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use StringArrayVarP for --include and --exclude flags (#196)
* Use StringArrayVarP for --include/--exclude
Replace `StringSliceVarP` with `StringArrayVarP` for the --include and
--exclude flags so regex strings can contain colons.
* Update README.md
Co-authored-by: Kazuki Suda <kazuki.suda@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,11 +70,11 @@ The `pod` query is a regular expression so you could provide `"web-\w"` to tail
70
70
`--container-state` | `running` | Tail containers with state in running, waiting or terminated. To specify multiple states, repeat this or set comma-separated value.
71
71
`--context` | | Kubernetes context to use. Default to current context configured in kubeconfig.
72
72
`--ephemeral-containers` | `true` | Include or exclude ephemeral containers.
73
-
`--exclude`, `-e` | | Log lines to exclude. (regular expression)
`--init-containers` | `true` | Include or exclude init containers.
79
79
`--kubeconfig` | | Path to kubeconfig file to use. Default to KUBECONFIG variable then ~/.kube/config path.
80
80
`--namespace`, `-n` | | Kubernetes namespace to use. Default to namespace configured in kubernetes context. To specify multiple namespaces, repeat this or set comma-separated value.
Copy file name to clipboardExpand all lines: cmd/cmd.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -325,10 +325,10 @@ func (o *options) AddFlags(fs *pflag.FlagSet) {
325
325
fs.StringVarP(&o.container, "container", "c", o.container, "Container name when multiple containers in pod. (regular expression)")
326
326
fs.StringSliceVar(&o.containerStates, "container-state", o.containerStates, "Tail containers with state in running, waiting or terminated. To specify multiple states, repeat this or set comma-separated value.")
327
327
fs.StringVar(&o.context, "context", o.context, "Kubernetes context to use. Default to current context configured in kubeconfig.")
328
-
fs.StringSliceVarP(&o.exclude, "exclude", "e", o.exclude, "Log lines to exclude. (regular expression)")
328
+
fs.StringArrayVarP(&o.exclude, "exclude", "e", o.exclude, "Log lines to exclude. (regular expression)")
329
329
fs.StringVarP(&o.excludeContainer, "exclude-container", "E", o.excludeContainer, "Container name to exclude when multiple containers in pod. (regular expression)")
330
330
fs.StringVar(&o.excludePod, "exclude-pod", o.excludePod, "Pod name to exclude. (regular expression)")
331
-
fs.StringSliceVarP(&o.include, "include", "i", o.include, "Log lines to include. (regular expression)")
331
+
fs.StringArrayVarP(&o.include, "include", "i", o.include, "Log lines to include. (regular expression)")
332
332
fs.BoolVar(&o.initContainers, "init-containers", o.initContainers, "Include or exclude init containers.")
333
333
fs.BoolVar(&o.ephemeralContainers, "ephemeral-containers", o.ephemeralContainers, "Include or exclude ephemeral containers.")
334
334
fs.StringVar(&o.kubeConfig, "kubeconfig", o.kubeConfig, "Path to kubeconfig file to use. Default to KUBECONFIG variable then ~/.kube/config path.")
0 commit comments