go-tidy-check

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2022 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Govulncheck Integration tests Golangci-lint Go Report Card

🧹 Check if your modules are tidy

This tool checks whether go mod tidy would change your modules go.mod or go.sum file. The action can check multiple (sub)modules and will print a diff of the changes that should be made. It will not make any changes to your modules.

May there be a go mod tidy -check in the future to replace this action.

💥 Action

Usage
name: Go mod tidy check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: katexochen/go-tidy-check@v1
        with:
          # (Optional) The path to the root of each modules, space separated. Default is the current directory.
          modules: . ./submodule ./submodule2

💻 Command-line interface

Prerequisites

Having Go installed.

Install

You can install the CLI with the go command:

go install github.com/katexochen/go-tidy-check@latest

Or download a binary from the release page.

Usage
Usage:
  go-tidy-check [flags] [PATH ...]

Flags:
  -d    print diffs
  -v    verbose debug output
  -version
        print version and exit

Within a Go workspace, it might be useful to run go-tidy-check for all modules of the workspace:

go-tidy-check -d $(go list -f '{{.Dir}}' -m)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址