Share Go code with CodeThis
Go's whole appeal is that a snippet is a complete program. Paste it, get a link, share with a teammate — same workflow.
Paste Go nowWhat you get
- Go-aware syntax highlighting via CodeMirror
- Instant shareable link — no signup required
- Optional expiration (7 days, 30 days, permanent)
- Password protection for private pastes
- Works with the REST API and MCP server
- Rich markdown and MDC components alongside code
Common use cases for Go pastes
- HTTP handlers and middleware
- Goroutine patterns
- Small CLI tools
- Benchmark reproductions
Example
package main
import (
"fmt"
"sync"
)
func main() {
var wg sync.WaitGroup
for i := 1; i <= 3; i++ {
wg.Add(1)
go func(n int) {
defer wg.Done()
fmt.Println("worker", n)
}(i)
}
wg.Wait()
}
Related languages
Ready to share some Go?