go-boilgen

command module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 1 Imported by: 0

README

Go Boilerplate Generator

Go Boilerplate Generator is used to generate core modules of boilerplate such as usecase, service, repository, models, and entity. It is use Clean Architecture and Domain-Driven Design. You can generate a whole modules just by running this command.

Installation

The following command is used for install it into your local

go install github.com/Muruyung/go-boilgen@latest

Requirement

If you want to generate code for a new project, you have to do init first

go mod init project-name

If you want to generate code for a new project or also an old project, you need to add this dependencies into your project

go get github.com/Muruyung/go-utilities@latest

Command

This is example basic command using default method

go-boilgen -s service_name -n module_name -f "field_name1:data_type,field_name2:data_type" -m "method1,method2"

You can just generate entity only using flag --entity-only.

go-boilgen -s service_name -n module_name -f "field_name1:data_type,field_name2:data_type" --entity-only

If you want to generate custom method, you must use the flag -c (or --custom-method), -p (or --params), and -r (or --return, optional)

go-boilgen -s service_name -n module_name -c custom_method_name -p "field_name1:data_type,field_name2:data_type" -r "field_name1:data_type,field_name2:data_type"

Use this command for more information about Go-Boilgen.

go-boilgen --help

Documentation

Overview

Copyright © 2023 Robi Naufal Kaosar Robi.kaosar@salt.co.id

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL