Plugin options
Reference for the GoPluginOptions accepted by the @naxodev/gonx plugin registration in nx.json. The plugin infers Nx projects from every go.mod matched by **/go.mod.
String form (all defaults apply):
{
"plugins": ["@naxodev/gonx"]
}
Object form:
{
"plugins": [
{
"plugin": "@naxodev/gonx",
"options": {
"buildTargetName": "build",
"skipGoDependencyCheck": true
}
}
]
}
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
| buildTargetName | string | build | Name of the inferred build target. Inferred only for applications. |
| testTargetName | string | test | Name of the inferred test target. |
| runTargetName | string | serve | Name of the inferred run target. Inferred only for applications. |
| tidyTargetName | string | tidy | Name of the inferred tidy target. |
| lintTargetName | string | lint | Name of the inferred lint target. |
| generateTargetName | string | generate | Name of the inferred generate target. |
| releasePublishTargetName | string | nx-release-publish | Name of the inferred release publish target. |
| tagName | string | - | Tag applied to every inferred Go project. |
| skipGoDependencyCheck | boolean | false | Disables Go project dependency detection in the Nx workspace graph. |
- Applications are projects with a
main.gocontainingpackage mainandfunc main(, or acmd/directory. All other Go projects are treated as libraries. buildTargetNameandrunTargetNameonly affect applications; libraries never infer build or run targets regardless of these options.