gofmt-git

command module
v0.0.0-...-43135cf Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

DEPRECATION NOTICE

This repository fills a niche role that go fmt ./... occupies already. It was intended to save time in large repositories, but it's impact is minimal. Thus, it has been deprecated.

gofmt-git

tag go report card go version license

Want to avoid formatting unchanged Go files? This CLI application formats Go files in a Git repository's worktree. You can execute this within any directory inside of the repository.

% git status -s
 M main.go
 M pkg/cmd/run.go
 M pkg/cmd.go

% gofmt-git
[+] main.go
[+] pkg/cmd/run.go
[=] pkg/cmd.go

Installation

Currently, the recommended method to obtain (and update) gofmt-git is to execute the following:

go get -u github.com/nickgerace/gofmt-git

If you would like upgrade it via automation, you can use the above command, or update all downloaded Go modules by executing the following:

go get -u all

Uninstallation

Delete gofmt-git from your GOBIN directory.

Limitations

This tool runs with the default settings of go fmt (e.g. go fmt <filename> or go fmt ./...). It does not offer any formatting options at this time.

Compatibility

gofmt-git should work on any primary platform that Go supports. Please file an issue if your platform is unsupported, or is not working as expected.

Code of Conduct

This repository follows and enforces the Go programming language's Code of Conduct.

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