freeCodeCamp/guide/english/go/go-playground/index.md

28 lines
1.2 KiB
Markdown
Raw Normal View History

---
title: Go Playground
---
# The Golang Playground
The Golang playground is a website where you can write Go code online, so that you don't have to set up any developmet environment.
Just open a new browser window clicking [Playground](https://play.golang.org).
Once there you'll get the buttons:
1. Run
2. Format
3. Imports
4. Share
The Run button sends the instruction to compile the code you wrote to the google servers that run the golang backend.
The Format button implements the idiomatic formatting style of the language, you can read more [here](https://golang.org/pkg/fmt/)
Imports just check what packages you have declared within import(). An import path is a string that uniquely identifies a package. A package's import path corresponds to its location inside a workspace or in a remote repository (explained below). [More](https://golang.org/doc/code.html#ImportPaths)
With Share you get an URL where the code you just wrote is saved. Useful when asking for help showing your code.
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
* [The Go Playground](https://play.golang.org/)
* [A Tour of Go](https://tour.golang.org/welcome/4)