...

Package structtag

import "golang.org/x/tools/go/analysis/passes/structtag"
Overview
Index

Overview ▾

Package structtag defines an Analyzer that checks struct field tags are well formed.

Index ▾

Package files

structtag.go

Constants

const Doc = `check that struct field tags conform to reflect.StructTag.Get

Also report certain struct tags (json, xml) used with unexported fields.`

Variables

var Analyzer = &analysis.Analyzer{
    Name:             "structtag",
    Doc:              Doc,
    Requires:         []*analysis.Analyzer{inspect.Analyzer},
    RunDespiteErrors: true,
    Run:              run,
}