helpers

package
v0.1.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectComponentsForTest

func InjectComponentsForTest(t *testing.T, appDir string)

InjectComponentsForTest copies the components module into the test app directory and adds require/replace directives so go mod tidy can resolve component imports. This is needed because the components sub-module isn't published to the Go module proxy yet.

func ValidateCompilation

func ValidateCompilation(t *testing.T, appDir string, opts ...ValidationOptions)

ValidateCompilation runs sqlc generate (if applicable), go mod tidy, and go build ./... in the given app directory. This ensures that generated code actually compiles and catches syntax errors, type mismatches, and missing dependencies before they reach production.

Types

type ValidationOptions

type ValidationOptions struct {
	SkipGoModTidy bool // Skip go mod tidy (useful when the caller already ran it)
}

ValidationOptions controls optional steps in ValidateCompilation.

Jump to

Keyboard shortcuts

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