pattern

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package pattern is the one grammar Skael uses to name a group of skills: an exact skill name, a prefix ending in "*" such as "payments:*", or "*" for every skill. Ownership rules, set entries and followed sources share it.

Index

Constants

This section is empty.

Variables

View Source
var NameRe = regexp.MustCompile(`^[a-z0-9]([a-z0-9:.-]*[a-z0-9])?$`)

NameRe is a valid skill name or namespace.

Functions

func IsPrefix

func IsPrefix(p string) bool

IsPrefix reports whether p matches by prefix rather than exactly.

func Matches

func Matches(p, name string) bool

Matches reports whether name falls under p.

func Scope

func Scope(p string) string

Scope returns the prefix a name must begin with to match p.

func Validate

func Validate(p string) error

Validate enforces the grammar.

Types

This section is empty.

Jump to

Keyboard shortcuts

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