cmd_cache

command module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

README

cmd_cache

Codecov Status Github All Releases

Run command with caching.

When cache exists, replay by cache. When cache doesn't exist, run command and cache it.

Cache key can be generated with these way:

  • Command
  • File content (path and content)
  • Environment variable (name and value)
  • Text

Usage

Example
$ cmd_cache --file depedingfile.go --env GOPATH -- go build
Options
cmd_cache

Usage:
 cmd_cache [--cache-directory=DIRECTORY] [(--file FILE | --env ENV | --text TEXT)...] -- [COMMAND...]
 cmd_cache (--help | --version)

Arguments:
 FILE      depending file. (e.g. prog.h)
 ENV       depending environment variable. (e.g. LD_LIBRARY_PATH)
 TEXT      text affecting command.
 COMMAND   real command.

Options:
 -h --help               						 Show this screen.
 -V --version            						 Show version.
 --cache-directory=DIRECTORY    Cache directory [default: .cmd_cache]

Build

$ go get -d ./...
$ go build

LICENSE

Source

The 3-Clause BSD License. See also LICENSE file.

statically linked libraries:

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