Skip to content

nkien0204/lets-go

Repository files navigation

Base Golang backend server

Providing basic packages for simple Golang server such as Tcp Server, HTTP Server, Kafka Client and Database driver, WebSocket, ... (MongoDb, Redis and MySQL).

All you need to do is implementing your own business logic!.

How to use

Prerequirement: MacOS/Linux/Windows, Go 1.22.1+

Install

Note: Please make sure that your $GOPATH/bin is in $PATH

go install github.com/nkien0204/lets-go@latest

Generate project

Usage:

lets-go gen <project-name> [flags]
cd <project-name> && go mod tidy

Flags:

-m, --mod:  download online (onl) or generate offline (off) (default "onl")
-u, --moduleName: name of module (eg: github.com/nkien0204/lets-go) 

Note: online mod should have the internet connection for working.

Run lets-go -h for more detail.

After generate successfully, you should see your project something like this:

├── cmd
├── internal
│   ├── delivery
│   │   ├── config
│   │   └── greeting
│   ├── domain
│   │   ├── entity
│   │   │   ├── config
│   │   │   └── greeting
│   │   └── mock
│   ├── repository
│   │   ├── config
│   │   └── greeting
│   └── usecase
│       ├── config
│       └── greeting

Special dependencies