Code Inspections in Go Template
This topic lists all GoLand code inspections available in Go Template.
You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settings CtrlAlt0S.
Inspection | Description | Default Severity |
---|---|---|
Duplicate variable | Reports duplicate Go Template variables that are declared in the same scope. Duplicating a variable reassigns the existing variable with the same name. This operation might lead to different unpredicatable issues. Example:
| |
Unknown variable | Reports usages of unknown variables in Go Templates. Parsing of such templates will cause panic because variables must be declared before usage. Example:
| |
Thanks for your feedback!
Was this page helpful?