trim

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultYamlFileName = "trim_config.yaml"

Functions

func Trim

func Trim(files, includeDir []string, outDir string) error

Trim to trim thrift files to remove unused fields

func TrimAST

func TrimAST(arg *TrimASTArg) (structureTrimmed int, fieldTrimmed int, err error)

TrimAST parse the cfg and trim the single AST

Types

type TrimASTArg added in v0.3.3

type TrimASTArg struct {
	Ast         *parser.Thrift
	TrimMethods []string
	Preserve    *bool
	MatchGoName *bool
}

type Trimmer

type Trimmer struct {
	// contains filtered or unexported fields
}

type YamlArguments added in v0.3.3

type YamlArguments struct {
	Methods          []string `yaml:"methods,omitempty"`
	Preserve         *bool    `yaml:"preserve,omitempty"`
	PreservedStructs []string `yaml:"preserved_structs,omitempty"`
	MatchGoName      *bool    `yaml:"match_go_name,omitempty"`
}

func ParseYamlConfig added in v0.3.3

func ParseYamlConfig(path string) *YamlArguments

Jump to

Keyboard shortcuts

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