GithubHelp home page GithubHelp logo

go-template's Introduction

go-template

Architecture template for Golang services

Overview

This is a personal Go project template that you can use as a starting point for your project. You will need to replace the placeholder variables/values/names with your own though.

The purpose is to scientifically organize the code structure, ensure that the project directory structure is clear, logically separated, the code is readable, and spaghetti code is avoided.

Referenced from the Go Project Layout project.

Quick start

The basic premise:go 1.18 docker.
Execute the following commands in sequence.

  1. go mod init go-template
  2. go mod tidy
  3. make dev

Structure introduction

api

Service entry for protocols such as http, https, websocket, etc., may also include OpenAPI/Swagger specs, JSON schema files, protocol definition files.

cmd

The startup file of the project, usually calling the code in the pkg、internet、web packages.

configs

Configuration file, and read the configuration.

docker

Docker-related configuration to distinguish multiple environments

internal

Private application and library code.

pkg

Code available for external reference.

test

Test code and test data.

tools

Supporting tools for this project.

web

Web application specific components: static web assets, server side templates and SPAs.

go-template's People

Contributors

smartxingzhou 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.