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

catalogset

package
v2.219.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package catalogset indexes the compiled catalogue superset by source, so an org can be expanded and a skill reached by address. See docs/skill-catalogues.md.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Source catalogmanifest.Source
	Path   string
	Skills []string
}

Catalog is one compiled catalogue and the skills it actually offers.

type Duplicate

type Duplicate struct {
	Name   string
	Kept   catalogmanifest.Source
	Shadow catalogmanifest.Source
}

Duplicate is one name two catalogues offer with equal content. Divergent content is fatal instead. See docs/skill-catalogues.md.

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set is the compiled superset in manifest declaration order.

func Build

func Build(entries []catalogmanifest.Catalog) (*Set, error)

Build reads each catalogue's skill directories. A skill is a directory carrying SKILL.md. See docs/skill-selectors.md.

func (*Set) Catalogs

func (s *Set) Catalogs() []Catalog

Catalogs returns every catalogue in declaration order.

func (*Set) Duplicates

func (s *Set) Duplicates() ([]Duplicate, error)

Duplicates rules on every name more than one catalogue offers: equal content dedupes with a note, divergent content is fatal and names both sources.

func (*Set) Owner

func (s *Set) Owner(owner string) []Catalog

Owner returns every catalogue under owner, in declaration order. The grant is open, so a repository added later needs no config change.

func (*Set) Resolve

func (s *Set) Resolve(address string) (Skill, error)

Resolve reaches one skill by address, terse or forge-qualified. A terse address matching two forges is refused rather than resolved.

func (*Set) SelectOrg

func (s *Set) SelectOrg(owner string, patterns []string) ([]Skill, error)

SelectOrg admits the slice patterns bound, failing closed on an org holding no catalogue. Patterns apply across the org's whole surface.

type Skill

type Skill struct {
	Name    string
	Path    string
	Root    string
	Source  catalogmanifest.Source
	Address string
}

Skill is one admitted skill, carrying the address a record names it by and the catalogue root it was found in.

Jump to

Keyboard shortcuts

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