vet

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 27 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

Overview

Package vet is the go/analysis analyzer: it finds sqlshape.Query[R, P](literal) calls, expands each template, checks every expansion against schema.sql and matches result columns / parameters against R / P.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:       "sqlshape",
	Doc:        "checks every expansion of sqlshape.Query templates against schema.sql and the Go result / parameter types",
	Run:        run,
	Requires:   []*analysis.Analyzer{inspect.Analyzer},
	ResultType: reflect.TypeOf((*consumers.Index)(nil)),
}

Analyzer is the sqlshape checker.

Functions

This section is empty.

Types

type BindingFact

type BindingFact struct {
	Kind   byte // 'e' enum, 'v' CHECK IN value set, 'l' lookup table rows, 'd' domain, 'k' key identity
	Key    string
	Labels []string // enum labels, for downstream conversion / switch checks
}

BindingFact records what a Go type was bound to in the package that declares it or uses it.

func (*BindingFact) AFact

func (*BindingFact) AFact()

func (*BindingFact) String

func (f *BindingFact) String() string

type ConstSetFact

type ConstSetFact struct{ Values []string }

ConstSetFact records the string constants declared for a named string type.

func (*ConstSetFact) AFact

func (*ConstSetFact) AFact()

func (*ConstSetFact) String

func (f *ConstSetFact) String() string

type TypeBindingFact

type TypeBindingFact struct{ PG string }

TypeBindingFact records the PG type a Go type declares it carries.

func (*TypeBindingFact) AFact

func (*TypeBindingFact) AFact()

func (*TypeBindingFact) String

func (f *TypeBindingFact) String() string

Jump to

Keyboard shortcuts

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