-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go sample can't run files without task #14007
Comments
Could the command be parameterized so it take the file name? We used to have that in the commands macro? |
Yes, it can be parameterized. |
@azatsarynnyy that would be awesome. parametrized task is ok for now, I guess |
@azatsarynnyy Could you please show how to configure that task to @sparkoo ? |
I don't think it's something very costly so we should take it as part of the 7.0 or 7.1 |
@slemeur @sparkoo }
"type": "che",
"label": "run current file",
"command": "go get -d && go run ${file}",
"target": {
"containerName": "go-cli"
}
} FYI all the variables that can be processed by the substitution mechanism are available through Note, resolving the variables in the |
I'm labelling this issue as bug (as misconfiguration of the command). |
Is your task related to a problem? Please describe.
Our golang devfile (https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/go) uses https://github.com/golang/example.git as a sample project. It has many runnable files with
func main()
, but we have only tasks foroutyet
subproject. AFAIK there is no way how to run Go file from IDE. Some languages can run files with littleRun | Debug
hovering over the runnable function, bug in Go, this does not work. So only way how to run files is by running terminal and write commands. I would consider this as not good IDE user experience.Describe the solution you'd like
func main()
.Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: