In c ++, when creating a function, it was possible to do so int main(int argc, char** argv) , therefore, when starting from the terminal, you can pass arguments. When compiling into GoLang , it says that the main functions cannot have arguments.
How do I pass arguments to an application on golang?

1 answer 1

Command line arguments can be obtained via from the array os.Args

You can also use the flag package - to parse arguments like --name = value