gckdir

command module
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2018 License: MIT Imports: 4 Imported by: 0

README

Build Status Go Report Card

gckdir

This is go-check-directory tool.

Description

This tool can generate a hash list of specified directory in the json format.
With the hash list, you can verify the target directory's structure and each hash value of files.

Usage

Generate
$ gckdir generate path/to/source_directory hash_name.json

For more details, please see gckdir generate --help.

Verify
$ gckdir verify hash_name.json path/to/target_directory

or

$ gckdir verify path/to/source_directory path/to/target_directory

For more details, please see gckdir verify --help.

Create a result report
$ gckdir verify --report hash_name.json path/to/target_directory

You can create a verification result report with --report or -r option.

verification_report

Create a report file with the name specified
$ gckdir verify --report --output output_name.html hash_name.json path/to/target_directory

You can specify the file name of the report file to be generated by this --output or -o option. Use with the --report and --open options.

If you do not specify a report file name with this option, it is automatically named in the format of Result_{YYYYMMDD}-{hhmmss}.{nanosecond}.html.

Create and open immediately a result report
$ gckdir verify --open hash_name.json path/to/target_directory

If you want to check the result immediately on the browser, please use the --open or -p option. This option includes the --report option.

open_animation

Verify only the structure of files and directories
$ gckdir verify --no-hv hash_name.json path/to/target_directory

Please use --no-hv or -nh option if you only want to check if files and directories are arranged with the intended structure and ignore the difference in hash value. This option can be used with --open or --report.

Ignore files of other software
$ gckdir verify --no-uv hash_name.json path/to/target_directory

Please use --no-uv or -nu option if you want to ignore files of other software in the target directory. This option can be used with --open or --report.

ExitCode

ExitCode returns with 0 if all processing is successful.
When a problem occurs, an integer of 1 or more is returned as ExitCode.
Even when the comparison result is Fail, an integer of 1 or more is returned as ExitCode.

Install

Please download the one suitable for your platform from the latest release page.
To get the latest source code, use go get:

$ go get -d github.com/kemokemo/gckdir

Contribution

Please feel free to send me a pull request. 😄

  1. Fork (https://github.com/kemokemo/gckdir/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

kemokemo

License

MIT

Special Thanks

This application uses the following excellent projects.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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