Skip to content

go-tooling/modcons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modcons

Go Report Card

Modcons is a CLI tool that inspects go.mod files for deprecated versions according to a set of deprecation rules.

For example:

github.com/myles-mcdonnell/blondie v1.0.0>=v3.0.0         #whitelist range equal or more than v1 less than v3
github.com/myles-mcdonnell/blondie =v0.8.0,v0.9.3         #whitelist v0.8.0 and v0.9.3
github.com/myles-mcdonnell/blondie !v1.5.7>=v1.8.3        #blacklist range equal or more than v1.5.7 less than 1.8.3
github.com/myles-mcdonnell/blondie !=v2.5.0               #blacklist

Where is modcop?

This project was initially named modcop until it was brought to my attention than a similar tool had already taken this name, which you can find here https://github.com/rogpeppe/modcop

Install

The latest binaries for all supported operating systems are here

If you have Go tool installed you may also run:

go get -u github.com/go-tooling/modcons/...

Usage

Example CLI usage:

modcons --rulepath=http://my.domain.com/myrules.modcons --modpath=./go.mod --parseOnly=false
  • Note that both path args may be local or http(s) urls.
  • parseOnly will only parse the rule file and will not inspect the go.mod file
  • Both modpath and parseOnly flag are optional, the default values are shown above
  • If any deprecated references are identified modcons exits with code 1.

About

Modcons is a CLI tool that inspects go.mod file for deprecated versions

Resources

License

Stars

Watchers

Forks

Packages

No packages published