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

Usage example:

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

Documentation