gomultifmt

command module
v0.0.0-...-d936444 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT Imports: 10 Imported by: 0

README

gomultifmt Travis go-report

Run multiple golang formatters in one command

Installation

go get -u github.com/Eun/gomultifmt

Usage

usage: gomultifmt [<flags>] [<path>...]

Run multiple golang formatters in one command

Flags:
  -h, --help             Show context-sensitive help (also try --help-long and --help-man).
  -f, --fmt=gofmt ...    Formatter to call (sepcify it multiple times, e.g.: --fmt=gofmt --fmt=goremovelines
  -w, --toSource         Write result to (source) file instead of stdout
  -s, --skip=DIR... ...  Skip directories with this name when expanding '...'.
      --vendor           Enable vendoring support (skips 'vendor' directories and sets GO15VENDOREXPERIMENT=1).
  -d, --debug            Display debug messages.
  -v, --version          Show application version.

Args:
  [<path>]  Directories to format. Defaults to ".". <path>/... will recurse.

Examples

Format all files with gofmt first, and then goremovelines afterwards
gomultifmt --vendor --fmt=gofmt --fmt=goremovelines -w ./...
Format main.go with gofmt and goremovelines, but write to stdout
gomultifmt --fmt=gofmt --fmt=goremovelines main.go

Bonus VSCode config

"go.formatFlags": [ "--fmt=goreturns", "--fmt=goremovelines", ], "go.formatTool": "gomultifmt",

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