valuector

package module
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 7 Imported by: 0

README

Documentation

Overview

Package valuector provides a go/analysis analyzer enforcing the gomatic Go immutability standard: an exported constructor (a New* function) returns a value, not a pointer, unless the constructed type transitively contains a field that cannot be copied (a sync primitive, atomic, buffer, or builder).

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = newAnalyzer()

Analyzer reports New* constructors that return a pointer to a copyable type.

View Source
var Registration = goyze.Registration{
	Name:       "valuector",
	Categories: []goyze.Category{"immutability"},
	URL:        "https://docs.gomatic.dev/yze/valuector",
	Analyzer:   Analyzer,
}

Registration declares this analyzer to the yze framework.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
yze-go-valuector command
Command yze-go-valuector runs the valuector analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
Command yze-go-valuector runs the valuector analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).

Jump to

Keyboard shortcuts

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