Go · online compiler

Run Go online

Run Go online — Go 1.22 through 1.25, real toolchain, no install.

Firecracker microVM live per-test verdicts multi-file compile

Go is Google's pragmatic answer to backend engineering: fast compiles, garbage collection, a strong concurrency model (goroutines + channels), and a boring type system that gets out of the way. The most-used language for cloud infrastructure today.

ls-judge runs Go with the standard `go` tool inside a Firecracker microVM. Pick the version — from 1.22 through the latest 1.25 — and get the matching stdlib. Generics work. `go run` semantics.

Multi-file support: add files via the file panel and they compile together as `package main`. Stdin from Test cases maps to os.Stdin.

Because ls-judge itself is written in Go (behind a horizontally-scalable Firecracker fleet), the Go path is one of the most heavily tested runtimes here — dogfood.

Starter code

What you get in Go

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

go
Go 1.25
package main
import "fmt"
func main(){var n int;fmt.Scan(&n);fmt.Println(n*2)}
stdin →21
expected →42
FAQ

Common questions about Go on ls-judge

Which Go versions?
Go 1.22, 1.23, 1.24, and 1.25 — selectable from the version picker.
Are Go modules supported?
Single-file / single-package compiles use `go run`. External modules cannot be fetched (no network in the sandbox).
Generics / iterators / range-over-func?
All supported on 1.23+.
Is CGO enabled?
No — CGO is off in the sandbox for isolation reasons.
Further reading
Also try