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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?