Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tgrziminiar/clean-arch-go-generator
- Owner: TGRZiminiar
- Created: 2024-01-22T16:35:12.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-28T15:33:17.000Z (9 months ago)
- Last Synced: 2024-04-18T09:28:43.690Z (7 months ago)
- Topics: clean-architecture, go, golang, shell
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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