doufei7464 2019-01-16 06:42 采纳率: 0%
浏览 2347

如何在GoLand中运行并将命令行参数传递给main.go?

我正在尝试用JetBrains的IDE Goland运行Go应用程序。我只想像这样运行以下命令:

$ go run main.go service.go

你能告诉我如何在“编辑配置”面板上进行配置吗?我试着设置“程序参数”,但那是行不通的。https://i.stack.imgur.com/DGvAy.png

  • 写回答

2条回答 默认 最新

  • douganggu4392 2019-01-16 07:11
    关注

    If you need to specify multiple files to the build configuration, you can either use the "Files" field to add more files to compile or change the "Run Kind" to be "Package" from the current "File" .

    The "Program arguments" field is used for arguments to the final program, not to the go tool.

    评论

报告相同问题?