Checks if there are any updates for imports in your module.

Overview

Go Up

GoDoc Build Status Code Coverage Go Report Card

goup checks if there are any updates for imports in your module. It parses go.mod files to get dependencies with their version, uses go-git to retrieve the list of remote tags and performs comparisons to advise to update if necessary. The main purpose is using it as a linter in continuous integration or in development process, but you can also use it to keep updated the go.mod files, see the -f option.

Features

  1. No dependency. Pure Go tool designed to be used as a linter. Zero call to go or git command line tools.
  2. As go.mod uses the semantic versioning for module version, goup does the same and provides 3 modes: major, major+minor and by default, path.
  3. Takes care of each part of a mod file: require, exclude and replace.
  4. Allows the capacity to force some modules to only use release tag, no prerelease.
  5. Manages one or more go.mod files, for example with ./... as parameter.
  6. As with go1.14, you can use the GOINSECURE environment variable to skip certificate validation and do not require an HTTPS connection. Since version v0.3.0, GOPRIVATE has the same behavior.
  7. Can amend on demand go.mod files with deprecated dependencies to update them.
  8. Since version v0.4.0, a colorized output in a TTY.

Demo

$ goup -v -m ./...
$ goup: github.com/rvflash/goup: golang.org/x/mod v0.2.1-0.20200121190230-accd165b1659 is up to date
$ goup: github.com/rvflash/goup: github.com/matryer/is v1.1.0 must be updated with v1.2.0
$ goup: github.com/rvflash/goup: github.com/golang/mock v1.4.0 is up to date
$ goup: github.com/rvflash/goup: gopkg.in/src-d/go-git.v4 v4.13.1 is up to date

Installation

It's important to have reproducible CI, so it's recommended to install a specific version of goup available on the releases page.

Go

GO111MODULE=on go get github.com/rvflash/[email protected]

Docker

docker run --rm -v $(pwd):/pkg rvflash/goup:v0.4.1 goup -V

Usage

goup [flags] [modfiles]

The goup command checks updates of any dependencies in the go.mod file. It supports the following flags:

  • -M: ensures to have the latest major version. By default, only the path is challenged.
  • -m: ensures to have the latest couple major with minor version. By default, only the path is challenged.
  • -V: prints the version of the tool.
  • -f: force the update of the go.mod file as advised
  • -i: allows excluding indirect modules.
  • -r: it's a comma-separated list of glob patterns to match the repository paths where to force tag usage. For example with github.com/group/* as value, any modules in this repository group must have a release tag, no prerelease.
  • -s: forces the process to exit on first error occurred.
  • -t: defines the maximum time duration to perform the check. By default, 10s.
  • -v: verbose output

[modfiles] can be one or more direct path to go.mod files, . or ./... to get all those in the tree.

Using example with an auto-signed local git repository:

GOINSECURE="gitlab.example.lan/*/*" goup -v .
Issues
  • goup doesn't respect GOPRIVATE

    goup doesn't respect GOPRIVATE

    I was trying out goup today on a module that imports several private git repos. All the standard go commands work with my module and my GOPRIVATE settings. I explicitly set GOPRIVATE, and it appears that the go tooling set GONOPROXY and GONOSUMDB as well for me, as they all point to some private repos. I'm guessing that goup will need to read these env vars, as well as look at the .netrc file for credentials, as that is the recommended way to specify private git auth last I checked for go tools.

    enhancement v0.3.0 
    opened by capnspacehook 2
  • check failed: git: invalid repository: unsecured

    check failed: git: invalid repository: unsecured

    for my repo I am getting following error

    check failed: git: invalid repository: unsecured call to http://../ cancelled: failed to list tags

    goup -v -m ./...
    
    goup: github.com/xmlking/logger: github.com/pkg/errors v0.9.1 is up to date
    goup: github.com/xmlking/logger: github.com/rs/zerolog v1.18.0 is up to date
    goup: github.com/xmlking/logger: github.com/sirupsen/logrus v1.4.2 is up to date
    goup: github.com/xmlking/logger/gormlog: ../ check failed: git: invalid repository: unsecured call to http://../ cancelled: failed to list tags
    goup: github.com/xmlking/logger/logrus: ../ check failed: git: invalid repository: unsecured call to http://../ cancelled: failed to list tags
    goup: github.com/xmlking/logger/logrus: github.com/sirupsen/logrus v1.4.2 is up to date
    goup: github.com/xmlking/logger/logrus: github.com/pkg/errors v0.9.1 is up to date
    goup: github.com/xmlking/logger/zap: ../ check failed: git: invalid repository: unsecured call to http://../ cancelled: failed to list tags
    goup: github.com/xmlking/logger/zap: github.com/pkg/errors v0.9.1 is up to date
    goup: github.com/xmlking/logger/zap: go.uber.org/zap check failed: git: invalid repository: unsecured call to http://go.uber.org/zap cancelled: failed to list tags
    goup: github.com/xmlking/logger/zerolog: ../ check failed: git: invalid repository: unsecured call to http://../ cancelled: failed to list tags
    goup: github.com/xmlking/logger/zerolog: github.com/pkg/errors v0.9.1 is up to date
    goup: github.com/xmlking/logger/zerolog: github.com/rs/zerolog v1.18.0 is up to date
    
    bug v0.2.0 
    opened by xmlking 2
Releases(v0.4.3)
Owner
Hervé Gouchet
https://resume.github.io/?rvflash
Hervé Gouchet
Fetch license information for all direct and indirect dependencies of your Golang project

gocomply beta Give open source Golang developers the credit they deserve, follow your legal obligations, and save time with gocomply. This tiny little

Tawesoft 15 Jan 8, 2022
depaware makes you aware of your Go dependencies

depaware depaware makes you aware of your Go dependencies. It generates a list of your dependencies which you check in to your repo: https://github.co

Tailscale 398 Jul 4, 2022
TBH, there are probably better/faster implementations out there.

Scott's Skiplist TBH, there are probably better/faster implementations out there. See https://github.com/MauriceGit/skiplist-survey I wrote this one b

Scott White 1 Feb 10, 2022
Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration, and automating updates to configuration when there is new code to deploy.

Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories), and automating updates to configuration when there is new code to deploy.

Flux project 3.6k Aug 7, 2022
The Golang linter that checks that there is no simultaneous return of `nil` error and an invalid value.

nilnil Checks that there is no simultaneous return of nil error and an invalid value. Installation & usage $ go install github.com/Antonboom/[email protected]

Anton Telyshev 10 Jun 23, 2022
Go linter that checks types that are json encoded - reports unsupported types and unnecessary error checks

Checks types passed to the json encoding functions. Reports unsupported types and reports occations, where the check for the returned error can be omited.

Lucas Bremgartner 26 Jun 17, 2022
"I do" stops interactive command if there is any potential risky pattern

Description ido (I do) executes your shell command provided as its input, but it may wait for you to confirm when there is some potential risky patter

Ky-Anh Huynh 3 Mar 30, 2022
Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.

Creates a linux group of users synced to your Google Workspace users and automatically imports their public SSH keys.

Dane Tuso 1 Jan 27, 2022
Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes.

DNS-Updater Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes. Motivation Havin

42_atomys 9 Mar 10, 2022
Handle any SQS use case, monitor any queue. Reusable for any project! Invoke in a goroutine to process SQS messages.

GOSQS This package is intended to be a Go SQS listener that can be imported and invoked as a goroutine handled by the life cycle of your service. It's

null 1 Dec 22, 2021
PHP functions implementation to Golang. This package is for the Go beginners who have developed PHP code before. You can use PHP like functions in your app, module etc. when you add this module to your project.

PHP Functions for Golang - phpfuncs PHP functions implementation to Golang. This package is for the Go beginners who have developed PHP code before. Y

Serkan Algur 50 Jul 24, 2022
A Go module that checks a domain's email information

mail-checker This checks a domain's email information, if it has DMARC, SPF Record, and or a Mail Server Bitcoin donations are welcome: 1J2aMYUnkPXkzE

GOCrazy 8 Jul 8, 2022
A simple tool to auto remove unused imports in rust

rust_strip A simple tool to remove unused imports in RUST. Call Cargo build/test Process the warning logs of unused imports Then replace the involved

sundyli 6 Apr 24, 2022
Goimportcycle - a tool to visualize Go imports resolved to the file level

Go Import Cycle goimportcycle is a tool to visualize Go imports resolved to the

Sam L 28 Apr 24, 2022
Peimports - based on golang's debug/pe this package gives quick access to the ordered imports of pe files with ordinal support

This code is almost entirely derived from the Go standard library's debug/pe package. It didn't provide access to ordinal based entries in the IAT and

Mike Wiacek 0 Jan 5, 2022
Fix imports for go source files (slightly better than goimports)

fiximports fiximports formats and adjusts imports for go source files. It improves on goimports by auto-detecting and grouping local go module imports

null 0 Jan 18, 2022
There is a certain amount of work to be done before you can implement the features of your Go powered CLI app

go-project-template-cli There is a certain amount of work to be done before you can implement the features of your Go powered CLI app. A few of those

null 0 Jan 23, 2022
BRUS - Parses your web server (e.g. nginx) log files and checks with GreyNoise how much noise your website is exposed to.

BRUS bbbbbb rrrrrr u u sssss b b r r u u s bbbbbb rrrrrr u u sssss b b r r u u s bbbbbb r r

dubs3c 1 May 29, 2022
Set is a useful collection but there is no built-in implementation in Go lang.

goset Set is a useful collection but there is no built-in implementation in Go lang. Why? The only one pkg which provides set operations now is golang

zoumo 49 Aug 2, 2022
Command not found? Install it right there!

Tii On most GNU/Linux systems, when a command is not found, a message showing what can be run to install the command is printed.

Ishan Goel 31 Jul 15, 2022
"there" also called "GoThere" aims to be a simple Go Library to reduce redundant code for REST APIs.

there "there" also called "GoThere" aims to be a simple Go Library to reduce redundant code for REST APIs. Despite the existence of the other librarie

Christoph Krassnigg 32 Jul 19, 2022
timea.go (did you see what I did there?) is a simple library to print given times in

timea.go timea.go (did you see what I did there?) is a simple library to print given times in "time ago" manner. Usage Get it: go get github.com/caarl

Carlos Alexandro Becker 26 Feb 17, 2022
There are 1,000,000 uatoms in an atom, a fact which I frequently forget and/or second-guess.

There are 1,000,000 uatoms in an atom, a fact which I frequently forget and/or second-guess. This repo contains a lot of programming to save myself a little bit of remembering.

Tess Rinearson 3 Nov 14, 2021
There are http server which handle transaction request(like: SET,GET,DELETE)

Loco_test_assesment There are http server which handle transaction request(like: SET,GET,DELETE) File "Backend Assessment.docx" has the proper informa

kumari tanushree 0 Jan 14, 2022
Note - A text editor for the Linux Terminal! (Mainly compatible with Arch, because I made it on there)

Note - A text editor for the Linux Terminal! (Mainly compatible with Arch, because I made it on there)

Awesome Sauce 5 Jul 15, 2022
null 1 Feb 3, 2022
Automatically updates the firmware of all your Shelly devices at once.

shelly-bulk-update Automatically updates the firmware of all your Shelly devices at once. Installation Download the binary for your platform: macOS cu

Fernando Mayo 13 Jul 17, 2022
send current weather updates from openweathermap api to your slack profile status using github action

go-slack-weather Send current weather updates from OpenWeatherMap API to your Slack profile status using GitHub Action Contents Setup Change Update Pe

Muhammad Thomas Fadhila Yahya 4 Dec 6, 2021