flag_objabi

package
v0.7.2202 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVersionFlag

func AddVersionFlag()

func DecodeArg

func DecodeArg(arg string) string

DecodeArg decodes an argument.

This function is public for testing with the parallel encoder.

func Flagcount

func Flagcount(name, usage string, val *int)

func Flagfn1

func Flagfn1(name, usage string, f func(string))

func Flagparse

func Flagparse(usage func())

func Flagprint

func Flagprint(w io.Writer)

Types

type DebugFlag

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

func NewDebugFlag

func NewDebugFlag(debug interface{}, debugSSA DebugSSA) *DebugFlag

NewDebugFlag constructs a DebugFlag for the fields of debug, which must be a pointer to a struct.

Each field of *debug is a different value, named for the lower-case of the field name. Each field must be an int or string and must have a `help` struct tag. There may be an "Any bool" field, which will be set if any debug flags are set.

The returned flag takes a comma-separated list of settings. Each setting is name=value; for ints, name is short for name=1.

If debugSSA is non-nil, any debug flags of the form ssa/... will be passed to debugSSA for processing.

func (*DebugFlag) Set

func (f *DebugFlag) Set(debugstr string) error

func (*DebugFlag) String

func (f *DebugFlag) String() string

type DebugSSA

type DebugSSA func(phase, flag string, val int, valString string) string

A DebugSSA function is called to set a -d ssa/... option. If nil, those options are reported as invalid options. If DebugSSA returns a non-empty string, that text is reported as a compiler error. If phase is "help", it should print usage information and terminate the process.

Jump to

Keyboard shortcuts

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