Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tgrziminiar/clean-arch-go-generator

Generator Shell script for Golang clean architecture
https://github.com/tgrziminiar/clean-arch-go-generator

clean-architecture go golang shell

Last synced: about 11 hours ago
JSON representation

Generator Shell script for Golang clean architecture

Awesome Lists containing this project

README

        

## Shell script to generate clean architecture golang pattern

### 1. Setup your Go project
```
go mod init {project module name}
```

### 2. Run Generate base script
```
chmod +x generate-base.sh
./generate-base.sh
```

### 3. Install libraly as need
```
go get github.com/joho/godotenv
```

### 4. Import every library into the file and save every file

### 5. Generate a module
This script can recieve 1 argument that going to be the module name
```
chmod +x generate-module.sh
./generate-module.sh {module name}
```

### 6. Import the library following this file priority
1. modules/product/productRepository/productRepository.go
2. modules/product/productUsecase/productUsecase.go
3. modules/product/productHttpHandler/productHttpHandler.go
4. server/product.go