Original post

Passing arguments in your application can be especially useful when you’re creating tools which can do different things, or the same thing in a different way. In go, you can do with by declaring your arguments as flags. In our example we’re using an argument to determine whether we should run task A or task B. Once you’ve declared your flags, you have to parse them at runtime to populate the variables and then you can use it like any other variable.