...

Package unmarshal

import "cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal"
Overview
Index

Overview ▾

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 ▾

Package files

doc.go unmarshal.go

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,
}