Skip to content

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
      }
    }
  ]
}
OptionTypeDefaultDescription
buildTargetNamestringbuildName of the inferred build target. Inferred only for applications.
testTargetNamestringtestName of the inferred test target.
runTargetNamestringserveName of the inferred run target. Inferred only for applications.
tidyTargetNamestringtidyName of the inferred tidy target.
lintTargetNamestringlintName of the inferred lint target.
generateTargetNamestringgenerateName of the inferred generate target.
releasePublishTargetNamestringnx-release-publishName of the inferred release publish target.
tagNamestring-Tag applied to every inferred Go project.
skipGoDependencyCheckbooleanfalseDisables Go project dependency detection in the Nx workspace graph.
  • Applications are projects with a main.go containing package main and func main(, or a cmd/ directory. All other Go projects are treated as libraries.
  • buildTargetName and runTargetName only affect applications; libraries never infer build or run targets regardless of these options.