gen

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderModuleReadme

func RenderModuleReadme(summary ModuleReadmeSummary) string

func RenderWalkthrough

func RenderWalkthrough(w Walkthrough, report string) (string, error)

func Run

func Run(args []string) int

Run implements `krit gen <artifact>`.

Types

type ModuleReadmeSummary

type ModuleReadmeSummary struct {
	Module       string
	DependsOn    []string
	DependedOnBy []string
	PublicAPI    []PublicAPISymbol
	Tests        []TestFileSummary
}

func BuildModuleReadmeSummary

func BuildModuleReadmeSummary(root, modulePath string) (ModuleReadmeSummary, error)

type PublicAPISymbol

type PublicAPISymbol struct {
	Kind string
	Name string
	File string
	Line int
}

type TestFileSummary

type TestFileSummary struct {
	Path  string
	Tests int
}

type Walkthrough

type Walkthrough struct {
	Seed  WalkthroughSeed   `json:"seed"`
	Files []WalkthroughFile `json:"files"`
}

func BuildWalkthrough

func BuildWalkthrough(root string, limit int) (Walkthrough, error)

type WalkthroughFile

type WalkthroughFile struct {
	Path   string `json:"path"`
	Reason string `json:"reason"`
	Score  int    `json:"score"`
}

type WalkthroughSeed

type WalkthroughSeed struct {
	Symbol string `json:"symbol"`
	File   string `json:"file"`
	Why    string `json:"why"`
	FanIn  int    `json:"fanIn"`
}

Jump to

Keyboard shortcuts

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