Skip to content

ldez/tagliatelle

Repository files navigation

Tagliatelle

Sponsor Build Status

A linter that handles struct tags.

Supported string casing:

  • camel
  • pascal
  • kebab
  • smake
  • goCamel
  • goPascal
  • goKebab
  • goSmake
  • upper
  • lower

Examples

// json and camel case
type Foo struct {
    ID     string `json:"ID"` // must be "id"
    UserID string `json:"UserID"`// must be "userId"
    Name   string `json:"name"`
    Value  string `json:"val,omitempty"`// must be "value"
}