← codetypingtest

Go typing test

Go is deliberately plain: few keywords, no semicolons at the ends of lines, no parentheses around conditions and one standard formatting style. That makes it quick to type once you know its quirks: := to declare variables, package main and an import at the top of every program, and fmt.Println with a capital P.

Start the Go typing test

What you'll type in Go

Example: FizzBuzz in Go

Go has no else if chain here: a bare switch with case lines does the work, and the for loop has no parentheses.

package main

import "fmt"

func main() {
    for i := 1; i <= 15; i++ {
        switch {
        case i%15 == 0:
            fmt.Println("FizzBuzz")
        case i%3 == 0:
            fmt.Println("Fizz")
        case i%5 == 0:
            fmt.Println("Buzz")
        default:
            fmt.Println(i)
        }
    }
}

Type this program now

Tips for typing Go faster

All 20 Go programs

Every program is real, working Go. Choose one to start typing it straight away.

Beginner

Intermediate

Advanced

Expert

How the test works

The timer starts on your first key and stops once every character is right. Press Enter for a new line and the indentation is filled in for you. A wrong key shows in red and counts as a mistake; press Backspace to go back and fix it. Your best time for each program is saved in your browser. Read more about how speed and accuracy are calculated, or get tips for typing code faster.

Other languages