package
1.23.0
Repository: https://github.com/onsdigital/dp-cli.git
Documentation: pkg.go.dev

# README

Project Generation

What

This tool can be used to create projects of the following categories:

  • generic-project
    • base-application
      • api
      • controller
      • event-driven

How to use

It is always beneficial to ensure you are using the most up to date version of the dp-cli tool. To update pull the latest changes and rebuild the tool like so:

git pull; make install; 
dp generate-project

This tool can be used in conjunction with the repository creation tool, for further details read COMPLETE_PROJECT_SETUP.md

Optional flags

Although these flags are optional, for most, if they are not provided then the user will be prompted for details.

  • --name : The name of the application, if Digital specific application it should be prepended with 'dp-'
  • --go-version : The version of Go the application should use (Not used on generic-projects)
  • --project-location : Location to generate project in
  • --create-repository : Should a repository be created for the project, default no. Value can be y/Y/yes/YES/ or n/N/no/NO")
  • --type : Type of application to generate, values can be: 'generic-project', 'base-application', 'api', 'controller', 'event-driven'")

Example output

The project generation command has been used to create example outputs of the various types of project. These can be found in the dp-hello-world repository. This provides a place where issues and discussions around the content of the base projects can be discussed and agreed upon. Once agreed upon there, the changes need to be applied to the templates in this repository and the example output can be regenerated with the new version of this tool, ready for further improvements.