Go playground

package main

import "fmt"

func greet(name string) {
    fmt.Printf("Hello, %s!\n", name)
}

func main() {
    greet("World")
}

Go is a statically typed, compiled programming language developed at Google. It is syntactically similar to C, but also has memory safety, garbage collection, structural typing, and CSP-style concurrency.

⛫ homepage • αω tutorial • ⚘ community

Sandbox details

Go version:     1.24
sandbox engine: codapi
sandbox name:   go
command:        run
in-browser:     ✘

Usage example:

```go
package main

func main() {
    println("Hello, World!")
}
```

<codapi-snippet sandbox="go" editor="basic">
</codapi-snippet>

Documentation