Finally installed the Action Buttons now I have a new problem

(Paul A. Gureghian) #1

(Paul A. Gureghian) #2

The error is : expected package, got go run.

(Johan Dahl) #3


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

(Paul A. Gureghian) #4

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

(Paul A. Gureghian) #5

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.

(Paul A. Gureghian) #6

(Ignacio Gómez) #7

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

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

(Paul A. Gureghian) #8

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

(Ignacio Gómez) #9

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.

(Paul A. Gureghian) #10

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