The v3 version fails to properly recognize the -- terminator, making it completely unusable in my use case.
Related: #1114 (unresolved) ,#1562 (useless, insane patch) ...
The v2 version can handle the terminator correctly, but it cannot disable the comma-splitting behavior of StringSliceFlag, and cli.separatorSpec is not exported, making all features related to separatorSpec (like WithSeparatorSpec) unavailable.
Related: #1856 ,#1552 (should never happen) , #1878, #1541 ...
The above issues are just what I found, there are definitely more than these
These are all known issues, but they were closed without being fixed.
Additionally, there are weird functions like cli.Args().Slice(), Args().Tail(), etc., and I can only guess their functionality based on their output.
Since I couldn't resolve these issues, I switched to Cobra. I'm just posting this to vent.
Simply changing the command parsing part from urfave/cli to cobra, my binary size dropped from 12MB to 5MB, which is incredible.
Although Cobra’s API isn’t as pleasant to write as urfave/cli, at least it doesn’t have serious bugs and can handle basic command parsing.
Sorry for raising this issue, please feel free to close
The v3 version fails to properly recognize the
--terminator, making it completely unusable in my use case.Related: #1114 (unresolved) ,#1562 (useless, insane patch) ...
The v2 version can handle the terminator correctly, but it cannot disable the comma-splitting behavior of
StringSliceFlag, andcli.separatorSpecis not exported, making all features related toseparatorSpec(likeWithSeparatorSpec) unavailable.Related: #1856 ,#1552 (should never happen) , #1878, #1541 ...
The above issues are just what I found, there are definitely more than these
These are all known issues, but they were closed without being fixed.
Additionally, there are weird functions like
cli.Args().Slice(),Args().Tail(), etc., and I can only guess their functionality based on their output.Since I couldn't resolve these issues, I switched to Cobra. I'm just posting this to vent.
Simply changing the command parsing part from
urfave/clitocobra, my binary size dropped from 12MB to 5MB, which is incredible.Although Cobra’s API isn’t as pleasant to write as
urfave/cli, at least it doesn’t have serious bugs and can handle basic command parsing.Sorry for raising this issue, please feel free to close