Skip to content

cmd/gofmt: remove -tabs and -tabwidth flags #7101

@bradfitz

Description

@bradfitz
Go indent style is tabs.

The gofmt command-line tool misleadingly advertises the ability to customize the ident
behavior with -tabs and -tabwidth, but then that is no longer gofmt'd code. The proper
Go style way to do this is to configure your editor's display of tabs instead.

I think we should remove those two flags from cmd/gofmt.  (not from the go/* packages)

The Go 1 compatibility promise excludes the tools.

Users who really care can write their own formatter binary using go/format or
go/printer, but it won't be gofmt.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions