Giter VIP home page Giter VIP logo

golang-repository-template's Introduction

golang-repository-template

Overview

Template for GO projects with some Docker and Makefile assistance to increase the quality of life. This is a simple GO project template you can use as a starting point. It includes some convenient scripts that install dependencies for your machine. However, it does not include any search and replace script and you will have to replace all the variables manually.

Get Started

  1. Download this repository's zip
  2. Copy what you need to your initialize GO Project
  3. Commit the changes

Pre-requisite

  • bazel
  • docker
  • go
  • make

Helpers

Make

# Run in docker
$ make build        # Build in docker
$ make lint         # Run linter in docker
$ make test         # Run test in docker

# Run on host
$ make build-local  # Build natively
$ make lint-local   # Run linter locally
$ make test-local   # Run test locally

Bazel

$ bazel build //...       # Build all targets
$ bazel test //...        # Run all tests
$ bazel query //...       # Show all known targets
$ bazel run //:gazelle    # Automatically generate BUILD.bazel

$ bazel run //:gazelle -- update-repos -from_file=go.mod # Automatcially update with go.mod

golang-repository-template's People

Contributors

metarsit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ma7ik

golang-repository-template's Issues

Repository Structure

Desired outcome

  • Repository structure for a simple GO project
  • All required folders have README.md that explains what it does

Docker implementation

Desired Outcome

  • Dockerfile for runtime/build environment for GO Project
  • Able to build, format and run test

Update to 1.16.2

Changes required

  • Update GO version to 1.16.2
  • Fix Makefile's linter bug
  • Ignore .vscode

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.