Categorygithub.com/hatchify/gomu
repositorypackage
0.5.56
Repository: https://github.com/hatchify/gomu.git
Documentation: pkg.go.dev

# README

gomu - Go Mod Utils

Designed to make working with mod files easier.

Commands

Commands are actions taken on the dependency chain.

This is usually parsed as the first non-flag argument passed to the utility.

Help Commands

Help commands will print usage instructions and details.

Running help commands with arguments and flags provides more specific contextual details.

gomu

:: Designed to make working with mod files easier. To learn more, run gomu help or gomu help <command> (Flags can be added to either help command)

gomu help

:: Prints available commands and flags. Use gomu help <command> <flags> to get more specific info.

gomu version

:: Prints current version. Install using gomu upgrade to get version support.

gomu upgrade

:: Updates gomu itself! Optionally accepts a version number. Without argument, updates to latest tag. Otherwise updates to latest branch/tag provided by first arg or -b. Usage: gomu upgrade or gomu upgrade -b master or gomu upgrade v0.5.1

Local Commands

Local commands can/will make stashes and edits to local files on your working copies.

However, they will not attempt to commit or push any changes by themselves.

gomu list

:: Prints each file in dependency chain.

gomu pull

:: Updates branch for file in dependency chain. Providing a -branch will checkout given branch. Creates branch if provided none exists.

gomu replace

:: Replaces each versioned file in the dependency chain. Uses the current checked out local copy.

gomu reset

:: Reverts go.mod and go.sum back to last committed version. Usage: gomu reset mod-common parg

gomu test

:: Runs go test on each library in the dependency chain. Prints names of failing libraries. Usage: gomu test mod-common

Destructive Commands

Destructive commands can/will attempt to commit and push changes.

If running with -name-only, it will NOT prompt you for a warning.

Please be careful!

gomu sync

:: Updates modfiles. Conditionally performs extra tasks depending on flags. Usage: gomu <flags> sync mod-common parg simply <flags>

gomu workflow

:: Adds a github workflow to a repo. Requires -source