Share Go service code, CLI tools, or concurrency patterns: syntax-highlighted and encrypted with a single paste.
1package main23import (4 "context"5 "fmt"6 "log/slog"7 "net/http"8 "os/signal"9 "syscall"10 "time"11)1213func main() {14 mux := http.NewServeMux()15 mux.HandleFunc("GET /health", func(w http.ResponseWriter, r *http.Request) {16 fmt.Fprintln(w, "ok")17 })1819 srv := &http.Server{Addr: ":8080", Handler: mux, ReadTimeout: 5 * time.Second}20 ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)21 defer stop()2223 go func() {24 slog.Info("listening", "addr", srv.Addr)25 if err := srv.ListenAndServe(); err != http.ErrServerClosed {26 slog.Error("server error", "err", err)27 }28 }()2930 <-ctx.Done()31 shutCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)32 defer cancel()33 srv.Shutdown(shutCtx) //nolint:errcheck34}Paste Go code and get a shareable link with full syntax highlighting, server-side rendered with no JavaScript overhead.
Deleted on first open. Can't be viewed twice.
Add a password for end-to-end encryption with no raw key stored.
Set pastes to expire after 1 hour, 1 day, 7 days, or up to 30 days. Gone when you say so.
No sign-up, no email, no ads. Paste and share in seconds.
Select Go for .go files. For go.mod files, plain text or TOML works best.
textdrop.sh is optimized for single-file snippets. For multi-file packages, paste the key file and link to your repository.
Yes. AES-256-GCM encryption runs in your browser before upload. Non-password pastes store the raw data key server-side for simple sharing and raw access; password-protected pastes keep the raw key out of the server.