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

sourcelayout

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package sourcelayout enforces ADR-007's naming rule: a Go file and the identifiers it declares are named for their responsibility, never for the position they were cut from (main_part2.go, body_mainPart2Test_44) or a generated hash (sigstartRecordingProxyListener39957725).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Violation

type Violation struct {
	Path   string
	Reason string
}

Violation is one file that breaks the naming rule. Path is slash-separated and relative to the checked root.

func Check

func Check(root string) ([]Violation, error)

Check walks root and reports every Go file whose name or identifiers are positional or hashed.

Jump to

Keyboard shortcuts

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