Giter Site home page Giter Site logo

dept's Introduction

dept

CircleCI codecov

Go modules based dependency management for Go tools.

Description

dept is a dependency management tool based on Go modules.
Instead of go.mod, dept helps you to manage Go tools. Go tools like Golint, errcheck are often used in various environment. dept provides you deterministic builds by manage tool dependencies.

dept is based on Go modules. All dependency resolution are provided by go mod commands.

Requirements

  • Go v1.13 or later

Basic usage

At first, let's create gotool.mod in a project root by the following command. All tools which are managed by dept are written to gotool.mod.

$ dept init

Then, let's install Go tools you want to use in your project.

$ dept get github.com/mitchellh/gox github.com/tcnksm/[email protected]
$ dept get -o lint github.com/golangci/golangci-lint/cmd/golangci-lint # rename golangci-lint as 'lint'

Finally, use exec to execute installed commands.

$ dept exec ghr -v
ghr version v0.12.0

If you want to installed commands without dept, please run build.

$ dept build
$ ls _tools
ghr     gox     lint

Available commands

init

$ dept init

get

dept get installs binaries to the specified directory.

$ dept get github.com/mitchellh/gox 

You can select the specified version like Go modules:

$ dept get github.com/mitchellh/[email protected]
$ dept get github.com/mitchellh/[email protected]

To install a binary with another name:

$ dept get -o lint github.com/golangci-lint/cmd/golangci-lint

Update tools to the latest version:

$ dept get -u github.com/mitchellh/gox
$ dept get -u # update all tools

remove

dept remove uninstalls passed tools.

$ dept remove github.com/mitchellh/gox

exec

dept exec executes the passed tool with arguments.

$ dept exec ghr -v

build

dept build builds all tools.

$ dept build

If $GOBIN enabled, it will be used preferentially.

$ GOBIN=$PWD/bin dept build

Also, -d flag is provided.

$ dept build -d bin

list

dept list list ups all tools managed by dept.

$ dept list
github.com/golangci/golangci-lint/cmd/golangci-lint lint v1.12.3
github.com/mitchellh/gox gox v0.4.0
github.com/tcnksm/ghr ghr v0.12.0

You can format output with -f flag.

$ dept list -f '{{ .Name }}'
lint
gox
ghr

clean

dept clean cleans up all cached tools.

$ dept clean

dept's People

Contributors

ktr0731 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

dept's Issues

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.