package unmarshal
import "golang.org/x/tools/go/analysis/passes/unmarshal"
The unmarshal package defines an Analyzer that checks for passing non-pointer or non-interface types to unmarshal and decode functions.
Analyzer unmarshal
unmarshal: report passing non-pointer or non-interface values to unmarshal
The unmarshal analysis reports calls to functions such as json.Unmarshal in which the argument type is not a pointer or an interface.
Index ¶
Variables ¶
var Analyzer = &analysis.Analyzer{ Name: "unmarshal", Doc: analysisutil.MustExtractDoc(doc, "unmarshal"), URL: "https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/unmarshal", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Source Files ¶
doc.go unmarshal.go
Directories ¶
Path | Synopsis |
---|---|
go/analysis/passes/unmarshal/cmd | |
go/analysis/passes/unmarshal/cmd/unmarshal | The unmarshal command runs the unmarshal analyzer. |
- Version
- v0.30.0 (latest)
- Published
- Feb 10, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 3 hours ago –
Tools for package owners.