Coder Social home page Coder Social logo

login's Introduction

Gopher

CircleCI

Logo

Maintainer: Gopher

This is a brief description on what the project does.

Development

Getting started

To work on this project you will first need Go installed on your machine.

Manual Setup

First make sure Go is properly installed and that a GOPATH has been set. You will also need to add $GOPATH/bin to your $PATH. For steps on getting started with Go: https://golang.org/doc/install

Next, using Git, clone this repository into $GOPATH/src/github.com/previousnext/gopher. All the necessary dependencies are either vendored or automatically installed, so you just need to type make test. This will run the tests and compile the binary. If this exits with exit status 0, then everything is working!

$ cd "$GOPATH/src/github.com/previousnext/gopher"
$ make test

To compile a development version of gopher, run make build. This will build everything using gox and put binaries in the bin and $GOPATH/bin folders:

$ make build
...

# Linux:
$ bin/gopher_linux_amd64 --help

# OSX:
$ bin/gopher_darwin_amd64 --help

Easy Setup

Alternatively, you can use the Docker Compose stack in the root of this repo to stand up a container with the appropriate dev tooling already set up for you.

Using Git, clone this repo on your local machine. Run the test suite to ensure the tooling works.

$ docker-compose run --rm dev make test

To compile a development version of gopher, run make build. This will build everything using gox and put binaries in the bin and $GOPATH/bin folders:

$ docker-compose run --rm dev make build

...

$ docker-compose run --rm dev bin/gopher_linux_amd64 --help

Dependencies

gopher stores its dependencies under vendor/, which Go 1.6+ will automatically recognize and load. We use dep to manage the vendored dependencies.

If you're developing m8s, there are a few tasks you might need to perform.

For details, see:

Documentation

See /docs

Resources

Tooling

# Dependency management
go get -u github.com/golang/dep/cmd/dep

# Testing
go get -u github.com/golang/lint/golint

# Release management.
go get -u github.com/tcnksm/ghr

# Build
go get -u github.com/mitchellh/gox

Common Tasks

Adding a dependency

If you're adding a dependency, you'll need to vendor it in the same Pull Request as the code that depends on it. You should do this in a separate commit from your code, as makes PR review easier and Git history simpler to read in the future.

To add a dependency:

Assuming your work is on a branch called my-feature-branch, the steps look like this:

  1. Vendor the new dependency.

    dep ensure -add github.com/foo/bar
  2. Review the changes in git and commit them.

Updating a dependency

To update a dependency:

  1. Update the dependency.

    dep ensure -update github.com/foo/bar
  2. Review the changes in git and commit them.

Running quality checks

make lint test

Building binaries

make build

Release

Release artifacts are pushed to the github releases page when tagged properly. Use semantic versioning prefixed with v for version scheme. Examples:

  • v1.0.0
  • v1.1.0-beta1

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.