Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/rhysd/gofmtrlx

Gofmt formats Go programs. It uses tabs for indentation and blanks for alignment. Alignment assumes that an editor is using a fixed-width font. Without an explicit path, it processes the standard input. Given a file, it operates on that file; given a directory, it operates on all .go files in that directory, recursively. (Files starting with a period are ignored.) By default, gofmt prints the reformatted sources to standard output. Usage: The flags are: Debugging support: The rewrite rule specified with the -r flag must be a string of the form: Both pattern and replacement must be valid Go expressions. In the pattern, single-character lowercase identifiers serve as wildcards matching arbitrary sub-expressions; those expressions will be substituted for the same identifiers in the replacement. When gofmt reads from standard input, it accepts either a full Go program or a program fragment. A program fragment must be a syntactically valid declaration list, statement list, or expression. When formatting such a fragment, gofmt preserves leading indentation as well as leading and trailing spaces, so that individual sections of a Go program can be formatted by piping them through gofmt. To check files for unnecessary parentheses: To remove the parentheses: To convert the package tree from explicit slice upper bounds to implicit ones: When invoked with -s gofmt will make the following source transformations where possible. This may result in changes that are incompatible with earlier versions of Go.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/rhysd/gofmtrlx
Keywords: formatter, golang
License: BSD-3-Clause
Latest release: about 6 years ago
First release: about 6 years ago
Namespace: github.com/rhysd
Stars: 21 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago

    Loading...
    Readme
    Loading...