tags

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NilStructFieldsError   = errors.New("nil struct fields")
	NilGoStructFieldsError = errors.New("nil go struct fields")
	NilStructJSONTagError  = errors.New("nil struct json tag")
)

Functions

func HideFileJSONTags

func HideFileJSONTags(filePath string, structFields *StructFields) error

HideFileJSONTags hides the JSON tags in the specified file

func HideFilesJSONTags

func HideFilesJSONTags(goFileStructFields *GoFileStructFields) error

HideFilesJSONTags hides the JSON tags in the specified files

func OverwriteJSONTags

func OverwriteJSONTags(filePath string, structJSONTag *StructJSONTag) error

OverwriteJSONTags overwrite the given structs fields JSON tags from the given Go file

Types

type FieldJSONTag

type FieldJSONTag map[string]string

FieldJSONTag map the field name to the new JSON tag

type GoFileStructFields

type GoFileStructFields map[string]*StructFields

GoFileStructFields map the Go file path to the struct fields

type StructFields

type StructFields map[string][]string

StructFields map the struct name to the fields name

type StructJSONTag

type StructJSONTag map[string]FieldJSONTag

StructJSONTag map the struct name to the field JSON tag

Jump to

Keyboard shortcuts

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