tagliatelle

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 10 Imported by: 15

README

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"
}

Documentation

Overview

Package tagliatelle a linter that handle struct tags.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) *analysis.Analyzer

New creates an analyzer.

Types

type Config added in v0.2.0

type Config struct {
	Rules        map[string]string
	UseFieldName bool
}

Config the tagliatelle configuration.

Directories

Path Synopsis
cmd
tagliatelle command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL