in your 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.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here