Switch guideGo editor

GO EDITOR

A Go editor for a small function or a useful pattern.

Keep a Golang helper, an error-handling example, or a short review note with its source. Go mode adds syntax highlighting to .go text in your local browser notebook.

Open editor

Free to use · No account needed · Saved in this browser

ready.go Go
package main

func readyNames(items map[string]bool) []string {
    names := make([]string, 0)
    for name, ready := range items {
        if ready {
            names = append(names, name)
        }
    }
    return names
}
A Go helper using a map, a range loop, and a slice. Map iteration order is not fixed.Try this example

EDIT IN YOUR BROWSER

Your local draft

The notebook’s editing tools, right here. Save to notebook when you want a named copy.

Open full editor

Enable JavaScript to edit here, or open the full editor above. The example and guide are always available.

This draft is shared with the full editor for this task and stays separate from named notes. Export a copy or save to notebook to include it in a notebook backup. This editor page and its tools reopen offline after the editor reports readiness. Informational and privacy guides need a connection.

A FEW SIMPLE STEPS

Get started

  1. Create a note and search for Go, Golang, or .go in the chooser.
  2. Paste the function or import a Go source file.
  3. Edit the source and compare an earlier version if needed.
  4. Download or copy the result and run your Go formatting and tests in the project.

Open editor takes you to the draft on this page. Paste or open a source file, or choose Try this example. Save to notebook keeps a named copy with your notes. Your workspace style stays unchanged.

Remember the reason for the code

Put package assumptions, expected inputs, and edge cases near the function you want to keep. A short comment about map ordering or an error path can make a snippet much more useful than source alone.

Use tags and stars to organize examples. Find and replace works within the editor, and comparison panes help inspect a changed function before you copy it into a package.

Bring the result back to your Go toolchain

The notebook does not run go build, go test, gofmt, or Go modules. Go currently has source editing and syntax highlighting without an automatic formatter.

Download the .go source and use your project to format, compile, and test it. Local browser storage keeps this note on one device; export a backup when you need another copy.

A few questions

Is this a Go playground or compiler?

It is a Go source editor and local notebook. It does not execute Go, compile packages, or run gofmt.