Skip to content
SPECIFICTION
Get listed

autopep8 vs gofmt

autopep8

github.com

gofmt

go.dev

Side by side

Figureautopep8gofmt
Price from—Free
Free plan—Yes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Plans published01
Spec score · Code formatters7.6 (#9)7.8 (#6)
Spec score · Code Formatting Tools7.6 (#19)7.8 (#13)
LicensePyPI identifies the project license as MIT License.Go is an open source project distributed under a BSD-style license.
Purposeautopep8 automatically formats Python code to conform to the PEP 8 style guide.Gofmt automatically formats Go programs using tabs for indentation and blanks for alignment.

Plans

autopep8

No plans published.

autopep8 pricing →

gofmt

  • gofmtFree

gofmt pricing →

In their own words

autopep8

autopep8 has no write-up on Specifiction yet; its figures are above.

Visit github.com

gofmt

gofmt is the Go source formatter distributed with Go installations, available on Linux, macOS, and Windows. It formats Go programs using tabs for indentation and spaces for alignment. With no path, it reads standard input; given a directory, it processes .go files recursively while skipping files whose names begin with a period. By default, reformatted source is written to standard output. Flags can show differences, list files that need formatting, apply rewrite rules, simplify code, or report all errors. The rewrite option uses patterns and replacements written as valid Go expressions. gofmt can also arrange documentation comments into canonical paragraphs, lists, headings, links, and code blocks. The Go project documents integrations for Vim, Emacs, Eclipse, and Sublime Text, plus Git pre-commit hooks and Mercurial. Since Go 1.18, it reads and formats files concurrently, with memory use limited in proportion to GOMAXPROCS. The executable is equivalent to go fmt. It is free, included in the Go installation, and distributed under a BSD-style license.

Visit go.dev