snippet

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentForBudget

func ContentForBudget(sn Snippet) []byte

func Dir

func Dir(home string) string

func HasProjection

func HasProjection(path string, sn Snippet, target string) bool

func Project

func Project(projectRoot string, snippets []Snippet, activeTools []string) ([]string, error)

func ProjectWithOptions

func ProjectWithOptions(projectRoot string, snippets []Snippet, activeTools []string, opts ProjectOptions) ([]string, error)

func RemoveLegacyCursorRule

func RemoveLegacyCursorRule(projectRoot string, sn Snippet) (string, bool, error)

func TargetPath

func TargetPath(projectRoot, name, target string) string

func TargetsAgent

func TargetsAgent(targets []string, agent string) bool

Types

type ProjectOptions

type ProjectOptions struct {
	CreateTargets bool
}

type Snippet

type Snippet struct {
	Name        string
	Description string
	Targets     []string
	Source      string
	Body        []byte
	Path        string
}

func Load

func Load(dir, name string) (Snippet, error)

func LoadProject

func LoadProject(dir string, names []string) ([]Snippet, error)

func Parse

func Parse(path string, data []byte) (Snippet, error)

Jump to

Keyboard shortcuts

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