gobundle

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: MIT Imports: 8 Imported by: 0

README ¶

🧳 gobundle

quickly update or install your go tools

Gobundle makes your Go tools portable and allows you to keep them up to date.

Installing / Getting started

go get github.com/iwittkau/gobundle/cmd/gobundle@latest
gobundle -v

Usage

$ gobundle -h
Usage of gobundle:
  -d    dumps installed tools and versions to gobundle.json
  -f string
        set configuation file
  -i    init configuration in home directory
  -v    print version

Initial Configuration

gobundle -i

Features

If you run gobundle without any flags, it tries to install the packages defined in your .gobundle configuration.

By using version latest for a package you can ensure you are always installing the latest available version of a tool. By specifying a specific version, you can pin a tool to this version. If you use branch as the version, gobundle installs the latest available version of that branch (e.g. master).

Keeping your Go tools up to date

By choosing latest as the version and running gobundle regularly, you can keep your go tools up to date easily.

Dumping your installed tools and their versions

  • gobundle -d dumps a gobundle.json of all tools and their installed versions from the $GOPATH/bin directory.
  • Tools that were built from local source will be skipped.
  • To install tools from a dumped gobundle.json use gobundle -f gobundle.json.

Configuration

If gobundle -i was previously run, a configuration file will exist in $HOME/.gobundle.

It is a very simple data structure, check examples/gobundle.json.

You can start by dumping your curently installed tools and copy them to $HOME/.gobundle

$ gobundle -d
$ cp ./gobundle.json ~/.gobundle 

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

If you encounter any issue, please let me know here.

Licensing

The code in this project is licensed under MIT license.

Documentation ¶

Overview ¶

Package gobundle implements data structures an install functions

Index ¶

Constants ¶

This section is empty.

Variables ¶

View Source
var DefaultConfiguration = Configuration{
	{Package: "github.com/rakyll/govalidate", Version: "latest"},
	{Package: "github.com/google/gops", Version: "latest"},
	{Package: "honnef.co/go/tools/cmd/staticcheck", Version: "2020.1.3"},
}

DefaultConfiguration for gobundle initialization

Functions ¶

This section is empty.

Types ¶

type Configuration ¶

type Configuration []Package

Configuration is the project configuration struct

func Dump ¶

func Dump(out io.Writer) (Configuration, error)

Dump tries to dump currently installed tools and version from $GOPATH/bin

func (Configuration) Install ¶

func (c Configuration) Install(out io.Writer) error

Install installs all packages of a configuration

type Package ¶

type Package struct {
	Package string `json:"package"`
	Version string `json:"version"`
}

Package is a configuration element

Directories ¶

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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