Pass arguments when running the app
I would like to pass arguments to my Go executable when I run it but I don't know how to do that. I tried to specify them in Environment and Program arguments because I don't understand the difference.
Here is a screenshot of what I tried

I would like to specify a flag that will be parsed by the flag library of Go.
Thanks in advance for your help
请先登录再写评论。
Hi Clay,
Here you can read about environment: https://en.wikipedia.org/wiki/Environment_variable
Program arguments field is what you need. You can verify that they were passed in command line string of Run tool window:
Assuming you have a dbuser flag defined
var dbUserName = flag.String("dbuser", "unknown", "help message for dbuser")