gofresh

Keep your Go package dependencies fresh. Console tool for checking and updating package dependencies (imports).

  • Owner: divan/gofresh
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

GoFresh

Build Status

Keep your Go package dependencies fresh. Console tool for checking and updating package dependencies (imports).

Introduction

GoFresh checks if there are any updates for imports in your package. It doesn't update packages, unless asked explicitly.

Demo

Installation

Just run go get:

go get github.com/divan/gofresh

Usage

Simply invoke gofresh inside a directory containing Go source files and it will tell you if you have any updates for your imports.

gofresh

To check a package in your $GOPATH, you can specify the exact package by name:

gofresh golang.org/x/tools/go/vcs

By default, it shows first 3 commits, but you can expand commits list using -expand flag. See -help for more details.

$ gofresh -h
gofresh [-options]
gofresh [-options] [package(s)]
Options:
  -dry-run
		Dry run
  -expand
		Expand list of commits
  -f	Use force while updating packages
  -update
		Update all packages

Using -update flag you can update automatically all packages.

If you want to update them manually, use following flags to see the commands to invoke:

gofresh -update -dry-run

Workflow

Typically, you simply invoke gofresh in your package dir to see what dependencies has been changed. Then you might want to see all new commits for the specific package and update it manually or update all automatically:

$ cd src/github.com/myusername/myproject/
$ gofresh
$ gofresh -expand github.com/howeyc/fsnotify
$ gofresh -update

Using with vendoring tools

If you use vendoring tool, such as Godep, your workflow doesn't change much:

  • First, use gofresh to inspect updates and update if needed
  • Second, run godep save or similar to update vendor dir from your GOPATH
  • Commit update

Issues

  • No support for Bazaar & SVN (how to check new commits on them?)
  • Missing/failed repositories are not reported (no way to identify error from vcs.RepoRootForImportPath)
  • Subpackages from the same repo will be checked all anyway (TODO: optimize)

Alternatives

  • Go-Package-Store - displays updates for the Go packages in your GOPATH and shows with a nice Web UI.

License

This program is under WTFPL license

Main metrics

Overview
Name With Ownerdivan/gofresh
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:
所有者活动
Created At2015-05-14 13:03:58
Pushed At2016-04-08 12:34:44
Last Commit At2016-04-08 15:34:43
Release Count0
用户参与
Stargazers Count141
Watchers Count9
Fork Count6
Commits Count35
Has Issues Enabled
Issues Count10
Issue Open Count4
Pull Requests Count3
Pull Requests Open Count1
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private