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.23
sandbox engine:     codapi
sandbox name:       go
allowed commands:   run
in-browser:         ✘

Usage example:

```go
package main

import "fmt"

func main() {
    fmt.Println("Hello, World!")
}
```

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

Documentation