pastebin

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

pastebin

Build Status CodeCov Go Report Card GoDoc

pastebin is a self-hosted pastebin web app that lets you create and share "ephemeral" data between devices and users. There is a configurable expiry (TTL) after which the paste expires and is purged. There is also a handy CLI for interacting with the service in a easy way or you can also use curl!

Source
go install github.com/taigrr/pastebin@latest
go install github.com/taigrr/pastebin/cmd/pb@latest

Usage

Run pastebin:

pastebin

Create a paste:

echo "Hello World" | pb
http://localhost:8000/p/92sHUeGPfo

Or use the Web UI: http://localhost:8000/

Or curl:

echo "Hello World" | curl -q -L --form blob='<-' -o - http://localhost:8000/

Configuration

When running the pastebin server there are a few default options you might want to tweak:

$ pastebin --help
  ...
  --expiry duration   expiry time for pastes (default 5m0s)
  --fqdn string      FQDN for public access (default "localhost")
  --bind string       address and port to bind to (default "0.0.0.0:8000")

Setting a custom --expiry lets you change when pastes are automatically expired (the purge time is 2x this value). The --fqdn option is used as a namespace for the service.

The command-line utility by default talks to http://localhost:8000 which can be changed via the --url flag:

pb --url https://paste.mydomain.com/

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package client provides a programmatic client for the pastebin service.
Package client provides a programmatic client for the pastebin service.
cmd
pb command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址