LinuxCommandLibrary

go-run

Compile and run Go code without saving a binary.

TLDR

Run a Go file

$ go run [path/to/file.go]
copy


Run a main Go package
$ go run [path/to/package]
copy

SYNOPSIS

go run [ build flags ] gofiles... [ arguments... ]

DESCRIPTION

Run compiles and runs the main package comprising the named Go source files.

For more about build flags, see go-build(1).

SEE ALSO

go-build(1).

AUTHOR

This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others).

Copied to clipboard