Application generator
Generates a Go application under the given directory and registers it as an Nx project through the gonx inference plugin. Aliased as app.
nx g @naxodev/gonx:application <directory>
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
| directory | string | required | Directory of the new application. Taken from the first positional argument. |
| name | string | - | Name of the application. Must match ^[a-zA-Z][^:]*$. |
| template | standard | cli | tui | standard | Application template to generate. |
| tags | string | - | Tags to add to the application (used for linting). |
| skipFormat | boolean | false | Skip formatting files. |
- Runs the init generator first to register the inference plugin in
nx.json. - Creates a
go.modfor the project unless the template already includes one. Adds the project togo.workwhen a Go workspace is present. - Inferred targets for applications:
build,serve,test,lint,tidy,generate,nx-release-publish. Application detection requires amain.gocontainingpackage mainandfunc main(, or acmd/directory.