Help us shape the future of Go! Take the 2026 Go Developer Survey

workspaceid

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package workspaceid makes the Workspace id (ADR 0043): 8 random base62 characters, the one address a Workspace has. It is a leaf package so that Workspace creation and the migration that backfills existing Workspaces share one generator.

Index

Constants

View Source
const (
	// Length is the number of characters in a Workspace id.
	Length = 8
)

Variables

View Source
var Pattern = regexp.MustCompile(`^[0-9A-Za-z]{8}$`)

Pattern matches a well-formed Workspace id.

Functions

func New

func New() string

New returns a fresh random Workspace id. Uniqueness is the database's to enforce: a caller that hits a unique violation asks for another.

Types

This section is empty.

Jump to

Keyboard shortcuts

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