gofresh

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

  • 所有者: divan/gofresh
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

主要指标

概览
名称与所有者divan/gofresh
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证
所有者活动
创建于2015-05-14 13:03:58
推送于2016-04-08 12:34:44
最后一次提交2016-04-08 15:34:43
发布数0
用户参与
星数141
关注者数9
派生数6
提交数35
已启用问题?
问题数10
打开的问题数4
拉请求数3
打开的拉请求数1
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?