Building a single Go file

If you build a file, it will generate an executable named after the Go file. Run the following command:

go build example.go

This will give you an executable named example that could be executed like this:

./example

Get Security with Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.