Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmbedCommand ¶
EmbedCommand returns the CLI command for generating embed declarations
func ExamplesCommand ¶
ExamplesCommand returns the CLI command for managing Go examples
func LensCommand ¶
LensCommand creates the CLI command for lens generation.
Two modes are supported:
Annotation mode (default): scans Go files in --dir for structs annotated with "fp-go:Lens" and generates lenses for them.
Type-name mode (--type flag, following the stringer convention): accepts a comma-separated list of struct names and optional package patterns as positional arguments (default "."). Uses go/packages for full type resolution — generics, external field types, and struct tags are all handled correctly without requiring source annotations.
func McpCommand ¶
McpCommand returns the CLI command for starting the MCP server
Types ¶
type Example ¶
type Example struct {
ID string // "package::ExampleName"
Package string
Symbol string // "Type.Method" parsed from func name
Name string // "ExampleType_Method"
Code string
DocComment string
Output string // contents of // Output: block
Imports string // import statements needed by the example
File string
}
Example represents a Go example function