Documentation
¶
Overview ¶
Package jsontag provides a go/analysis analyzer that reports struct field json/yaml tag keys that are not snake_case, per the gomatic data-format standard that serialized keys are snake_case. A file that mirrors an external, self-describing JSON-Schema document — detected by a struct field tagged `$schema`, JSON Schema's self-description marker — is exempt: its keys reproduce the external standard (SARIF, JSON-Schema catalogs) and are not the module's to choose.
Decode-only mirror detection: struct graphs that only flow into Unmarshal/Decode reproduce an external producer's document.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Analyzer = &analysis.Analyzer{
Name: "jsontag",
Doc: "reports struct field json/yaml tag keys that are not snake_case, per the gomatic data-format standard",
Run: run,
}
Analyzer reports struct field json/yaml tag keys that are not snake_case.
var Registration = goyze.Registration{ Name: "jsontag", Categories: []goyze.Category{"data"}, URL: "https://docs.gomatic.dev/yze/jsontag", 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-jsontag
command
Command yze-go-jsontag runs the jsontag analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`).
|
Command yze-go-jsontag runs the jsontag analyzer as a standalone go/analysis checker (text and -json output, and usable as a `go vet -vettool`). |