Finally installed the Action Buttons now I have a new problem

The error is : expected package, got go run.


It is exactly as the error message says. I expects the word package. Remove run in front of package.

I dont think “run” was there before. I think the action buttons did something. when i remove it, will it come back again ?

I removed “run”, did “Run go” button, then got : go run: no go files listed. I am in the Go folder where I have my .go source files. it doesnt see my .go files.

go run expects a target package to be compiled and executed:

usage: go run [build flags] [-exec xprog] package [arguments...]

Should i use “run go .” , “run go main.go” , “./” ?

Let’s say you have two files in package main, main.go and other.go, then you should execute go run main.go other.go, but go run . will work too. Take a look at the go command tools documentation for more details.

Tried . , main.go, other.go and all i get is “system cant find the file”. maybe ill just use the terminal and the code-runner extension and forget the action buttons for now

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.