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

engine

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package engine runs the shared contract/rule engine across Go packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Dir       string
	BuildTags []string
}

type Result

type Result struct {
	FileSet       *token.FileSet
	Diagnostics   []rules.Diagnostic
	Contracts     []*contract.StructContract
	ModulePath    string
	ModuleDir     string
	ModuleVersion string
	GoVersion     string
}

Result contains deterministic diagnostics and the source position table.

func Analyze

func Analyze(ctx context.Context, patterns []string, cfg config.Config) (Result, error)

Analyze loads package patterns and evaluates every discovered struct.

func AnalyzeWithOptions

func AnalyzeWithOptions(ctx context.Context, patterns []string, cfg config.Config, options Options) (Result, error)

AnalyzeWithOptions supports isolated worktrees and explicit build tags.

Jump to

Keyboard shortcuts

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