Online GO Lang Compiler
About this Go compiler
This free online Go compiler lets you write and run Go (Golang) programs in your browser. Use it to practise functions, slices, maps and goroutines on short programs without installing Go.
How to use the online Go compiler
- Write or paste your Go code in the editor. Sample code is already loaded.
- Click Run.
- Read the result in the black panel. Errors from your code appear there too.
Go compiler FAQs
How do I print output in Go?
Import the fmt package and use fmt.Println(), as in the sample code.
What is package main?
Every runnable Go program starts with package main and contains a main function.
Do I need to install Go?
No. Your code runs on a remote server and the output appears next to the editor.
