Online Go Editor and Compiler for Interviews
Write and run Go programs right in the browser, with no toolchain to install: the code compiles on the server, and errors and output show up at once. For an interview, open a shared session and send the candidate a link. Free, no sign-up.
Free, no sign-upHow to run a live coding interview in GoCollaborative code editors comparedCode sample
package main
import (
"fmt"
"sort"
"strings"
)
func main() {
words := strings.Fields("go is fun and go is fast")
count := map[string]int{}
for _, w := range words {
count[w]++
}
keys := make([]string, 0, len(count))
for k := range count {
keys = append(keys, k)
}
sort.Strings(keys)
for _, k := range keys {
fmt.Printf("%s=%d ", k, count[k])
}
fmt.Println()
}
Output
and=1 fast=1 fun=1 go=2 is=2
What the editor does
- Go 1.16: the program compiles and runs on the server in an isolated sandbox, and every participant sees compile errors and output.
- The standard library is at hand: strings, sort, strconv, container/heap, goroutines, and channels.
- Autotests: if a task has unit tests, you can run them from the session and see how many pass.
- Real-time collaborative editing: up to 5 participants in one session, with edits and cursors visible instantly.
- The task bank is open without an account. After a free sign-in: your own tasks, an interview mode with timers, candidate scoring, and interview history.
How to run the interview
- Click "Run an interview" — the session is created with a sample program, which you can replace with your own task.
- Describe the problem in Markdown and send the link to the candidate: they need no sign-up.
- Have the candidate verify the solution with calls from main and output through fmt. Put input data in the code or in the «Input (stdin)» field above the output — every participant sees it.
Typical interview tasks
- Count word frequencies with a map and print them in a stable order: why map iteration order in Go is random.
- Start several goroutines, collect their results through a channel, and wait for them with sync.WaitGroup.
- Write a worker pool that limits how many tasks run at once.
- Implement a stack and a queue on slices and explain when append allocates new memory.
- Handle errors idiomatically: return an error, wrap it with fmt.Errorf, and check it with errors.Is.
- Find the k most frequent elements with container/heap.
Limitations
- This is Go 1.16: there are no generics yet, they arrived in Go 1.18. Write functions for concrete types or use interface{}.
- Only the standard library is available: third-party modules are not downloaded.
- Building and running together are limited to 3 seconds and 64 KB of output: go run builds the program in the same run.
FAQ
- Which Go version is used?
- Go 1.16. The program compiles and runs on the server, so the result is the same for every participant.
- Can I use generics?
- No: generics arrived in Go 1.18, and this is Go 1.16. Concrete types, slices, and maps are enough for interview tasks.
- Do goroutines and channels work?
- Yes, it is a regular Go program. Just remember that a run is limited to 3 seconds: wait for the goroutines with sync.WaitGroup or a channel, or main exits first.
- Are there autotests for Go?
- Yes. If a task has unit tests, you can run them from the session. Your own tasks with tests need a free sign-in; task bank tasks marked «Any language» open with a Go starter and tests.
- Do I need to sign up?
- No. The editor opens at once, and for an interview the candidate only needs the link and a name. The task bank is open without an account too. Signing in is needed for your own tasks, interview mode, and history.