Giter Site home page Giter Site logo

go-bundled's Introduction

CI

Simple Golang Setup with Echo, GORM, Testify and Mockery

Description

This project aims to provide a straightforward setup for beginners who want to explore Golang.

Whether you’re new to programming or just diving into Go, this repository will help you get started with essential concepts and tools.

Features

Routing with Echo

Learn how to set up routes and handle HTTP requests using the Echo framework.

Using GORM as an ORM

Understand how to interact with databases using GORM, a powerful Go ORM library.

Concurrency with Channels and Goroutines

Explore Go’s concurrency model by using channels and goroutines effectively.

Project Structure

go-bundled/
┣ .github/
┃ ┣ workflows/
┃ ┗ dependabot.yml
┣ internal/
┃ ┣ handlers/
┃ ┣ middlewares/
┃ ┣ models/
┃ ┣ repositories/
┃ ┗ services/
┣ mocks/
┃ ┗ mock_UserRepositoryInterface.go
┣ pkg/
┃ ┗ validators/
┣ tmp/
┃ ┣ build-errors.log
┃ ┗ main
┣ .air.toml
┣ .gitignore
┣ .mockery.yaml
┣ README.md
┣ docker-compose.yml
┣ go.mod
┣ go.sum
┗ main.go

Testing

Learn how to write unit tests for your Go code to ensure reliability with Testify and Mockery.

CI

Integrate linters (such as golangci-lint) to maintain code quality.

Installation

Make sure you have Go installed on your system. If not, download it from here.

Clone this repository:

git clone [email protected]:carlosgonzalez/go-bundled.git

Navigate to the project directory:

cd go-bundled

Install dependencies:

go mod tidy

Mockery

go install github.com/vektra/mockery/[email protected]

Install air if you want to have live-reload capabilities

go install github.com/cosmtrek/air@latest

Usage

Run the application:

docker-compose up -d

if you have air installed, run:

air

otherwise simply run with

go run .

Generate mocks with Mockery

mockery --all

Contributing

Contributions are welcome! If you find any issues or want to enhance the project, feel free to submit a pull request.

go-bundled's People

Contributors

carlosgonzalez avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.