Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/goPublic

proposal: cmd/gofmt formatting/alignment of multiple struct tags #16918

Closed
@deankarn

Description

@deankarn

This is a proposal to add functionality to gofmt for formatting/alignment of multiple struct tags. If gofmt could align the tags it would become much more readable and save allot of time from having to do it manually.

example: ( just some tags I use, could be many others )

typeUserstruct {Namestring`json:"name" bson:"name" validate:"required"`LegalNamestring`json:"legalName" bson:"legalName" validate:"required"`Emailstring`json:"email" bson:"email" validate:"required"`....}

after gofmt:

typeUserstruct {Namestring`json:"name"      bson:"name"      validate:"required"`LegalNamestring`json:"legalName" bson:"legalName" validate:"required"`Emailstring`json:"email"     bson:"email"     validate:"required"`...}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp