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

featureregistry

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package featureregistry is the Go counterpart of the TypeScript feature catalog. Features are registered from init() functions in server/features/*.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustValidate

func MustValidate(m *testing.M)

MustValidate asserts registry completeness in tests. Call from TestMain: featureregistry.MustValidate(m).

func Register

func Register(f Feature)

Register adds a Feature to the global registry. Panics on duplicate ID. Call from init() in feature files (server/features/*.go).

Types

type Feature

type Feature struct {
	ID          string
	Title       string
	Description string
	RPCIDs      []string // proto scope:action IDs this feature implements
	Status      FeatureStatus
	Since       string // semver e.g. "1.4.0"
}

Feature is the Go counterpart of the TypeScript Feature interface. Every field is required — zero values are invalid.

func All

func All() []Feature

All returns a copy of all registered features.

func LookupRPC

func LookupRPC(rpcID string) *Feature

LookupRPC returns the Feature that declares the given RPC ID, or nil.

type FeatureStatus

type FeatureStatus string

FeatureStatus mirrors the TypeScript catalog's status field.

const (
	StatusStable       FeatureStatus = "stable"
	StatusExperimental FeatureStatus = "experimental"
	StatusDeprecated   FeatureStatus = "deprecated"
)

Jump to

Keyboard shortcuts

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