helpers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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