Skip to content
/ go-boilerplate Public template

A boilerplate for a simple GO app following clean code architecture

License

Notifications You must be signed in to change notification settings

Sharper-Flow/go-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Boilerplate

A ready to use template for GO applications that follows clean architecture principles.

Project Structure

  • cmd: Contains the main entry point for the command-line application, with a placeholder function.
    • cli Contains the command-line interface (CLI). The main.go file serves as the entry point for the CLI application.
  • internal: Houses the core application logic.
    • domain: Defines core entities and models.
    • repositories: Defines interfaces for interacting with external data sources.
    • usecases: Implements business logic and coordinates interactions with repositories.
    • interfaces: Provides concrete implementations for repository interfaces.
  • pkg: Contains reusable utility functions.

Usage

  1. Prerequisites:

  2. Get the code:

    git clone [https://github.com/Sharper-Flow/go-boilerplate.git](https://github.com/Sharper-Flow/go-boilerplate.git)
  3. Configuration

    • Create a .env file in the project root to store any keys or tokens (see .env.example for a template)
  4. Build and Run

    go build ./cmd/cli
    ./cli <args>

About

A boilerplate for a simple GO app following clean code architecture

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published