foriequal0 / pod-graceful-drain

You don't need `lifecycle: { preStop: { exec: { command: ["sleep", "30"] } } }`
Apache License 2.0
246 stars 16 forks source link

Exclude command from parsing flags #36

Open buildsville opened 2 years ago

buildsville commented 2 years ago

Hello. Thanks for this project! 😀

I tried to use this tool, and noticed that flags are ignored. And I found that the parsing was stopped by the command name at the beginning of the arguments.

https://pkg.go.dev/flag

Flag parsing stops just before the first non-flag argument ("-" is a non-flag argument) or after the terminator "--".

So, I propose to exclude the command name from the arguments to parse.

Thank you!

techmouse84 commented 1 year ago

@foriequal0 , unable to decrease deleteAfter due to this.