egg

command module
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2020 License: MIT Imports: 5 Imported by: 0

README

🐣 egg

Extended go get - alternative for the standard go get with a few little but useful features.

Build Template

💡 Idea

$ egg tools add github.com/golangci/golangci-lint@latest

$ egg binary get github.com/goreleaser/goreleaser@latest

Full description of the idea is available here.

🏆 Motivation

At Avito, we develop many services written on Go, and many of them use different tools such as easyjson, goimports, mockgen, and others. It isn't effortless to manage all of them through all teams in the company.

For that reason, I need a tool that helps me to track tool dependencies for services, interact with them, and manage scripts related to them (Makefile, activate script, etc).

🤼‍♂️ How to

egg deps
$ egg deps list
> github.com/izumin5210/gex
> github.com/spf13/cobra
> github.com/stretchr/testify
> go.octolab.org/toolkit/cli

$ egg deps check ...
egg make
$ egg make build ...
egg tools
$ mkdir tools && cd tools

# init a new toolset
$ go mod init your.module/tools
$ egg tools init

# add golangci-lint to tools.go
$ egg tools add github.com/golangci/golangci-lint
# add mockgen to tools.go and build it to bin/mockgen
$ egg tools add --build github.com/golang/mock/mockgen

# build tools to ${GOPATH}/bin/
$ ROOT="${GOPATH}/" go generate tools.go

# list the toolset
$ egg tools list
> mockgen
> golangci-lint
egg vanity
$ egg vanity generate ...

🧩 Installation

Homebrew
$ brew install kamilsk/tap/egg
Binary
$ curl -sSfL https://bit.ly/install-chicken | sh
# or
$ wget -qO-  https://bit.ly/install-chicken | sh
Source
# use standard go tools
$ go get -u github.com/kamilsk/egg
# or use egg tool
$ egg tools add github.com/kamilsk/egg

$ go mod edit -replace=github.com/izumin5210/gex=github.com/kamilsk/gex@latest
Bash and Zsh completions
$ egg completion bash > /path/to/bash_completion.d/egg.sh
$ egg completion zsh  > /path/to/zsh-completions/_egg.zsh

🤲 Outcomes

Patches
Research

made with ❤️ for everyone

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL