go install -v github.com/AdamShannag/jot/v2/cli/cmd/jot@latest
To generate a service, endpoint, or middleware using this tool, follow these simple steps:
- Run the command:
jot new
- Choose the option for creating a service.
- Provide a name for your service and specify the port.
- If this is a new project, also enter the project path.
- Run the command:
jot new
- Select either "endpoint" or "middleware" as your choice.
- Choose the service where you want to add the endpoint or middleware.
- Enter the name for your endpoint or middleware.
These straightforward steps will help you generate the necessary components for your project.
You can leverage the built-in API along with writer modules to create your projects in Golang. The API provides builders for projects, services, endpoints, and middleware. After constructing the project structure, simply pass it to the project writer and call the Write(path)
method to generate your project.