args

package
v0.3.18 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const WINDOWS_REPLACER = "#$$#"

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	AskVersion      bool
	Recursive       bool
	Verbose         bool
	Quiet           bool
	CheckKeyword    bool
	OutputPath      string
	Includes        StringSlice
	Plugins         StringSlice
	Langs           StringSlice
	IDL             string
	PluginTimeLimit time.Duration
}

Arguments contains command line arguments for thriftgo.

func (*Arguments) BuildFlags

func (a *Arguments) BuildFlags() *flag.FlagSet

BuildFlags initializes command line flags.

func (*Arguments) MakeLogFunc

func (a *Arguments) MakeLogFunc() backend.LogFunc

MakeLogFunc creates logging functions according to command line flags.

func (*Arguments) Output

func (a *Arguments) Output(lang string) string

Output returns an output path for generated codes for the target language.

func (*Arguments) Parse

func (a *Arguments) Parse(argv []string) error

Parse parse command line arguments.

func (*Arguments) Targets

func (a *Arguments) Targets() (specs []*generator.LangSpec, err error)

Targets returns a list of generator.LangSpec for target languages.

func (*Arguments) UsedPlugins

func (a *Arguments) UsedPlugins() (descs []*plugin.Desc, err error)

UsedPlugins returns a list of plugin.Desc for plugins.

type StringSlice

type StringSlice []string

StringSlice implements the flag.Value interface on string slices to allow a flag to be set multiple times.

func (*StringSlice) Set

func (ss *StringSlice) Set(value string) error

Set implements the flag.Value interface.

func (*StringSlice) String

func (ss *StringSlice) String() string

Jump to

Keyboard shortcuts

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