在golang中是否有用于命令行解释器的内置软件包? [重复]

I would like to create command-line tool like git, go or aws in which we will pass some sub-commands to the main command and the last sub-command could also have some flags. Some examples are:

git add <file>
go build <file>
aws s3 cp --recursive <src> <dest>

Here are some examples of my hypothetical tool:

mytool cmd1
mytool cmd2 -f <path>
mytool cmd3 -f1 -f2 value --flag3 <path>

I know we can use the fmt package for defining and parsing flags, but I don't know if this package gives me the feature I described above or not. I was wondering if there is any built-in package for doing so?

</div>

just do a simple search on google and you can find anything