go/run

Run Go Program

Run Go program directly

go
run
execute

Command

go run main.go

Explanation

Compile and run Go programs without creating an executable file.

Examples

Run main.go file

go run main.go

Run current directory

go run .

Run all Go files

go run *.go