scanner

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	Label string   `json:"label"`
	Str   *string  `json:"str,omitempty"`
	Int   *int64   `json:"int,omitempty"`
	Float *float64 `json:"float,omitempty"`
}

func NewFloatOption

func NewFloatOption(v float64, label string) *Option

func NewIntOption

func NewIntOption(v int64, label string) *Option

func NewIntStringerOption

func NewIntStringerOption(i int64, v string, label string) *Option

func NewStrOption

func NewStrOption(v string, label string) *Option

func (Option) Value

func (o Option) Value() interface{}

type Options

type Options []Option

func (Options) Len

func (o Options) Len() int

func (Options) Less

func (o Options) Less(i, j int) bool

func (Options) Swap

func (o Options) Swap(i, j int)

func (Options) Values

func (o Options) Values() []interface{}

type Scanner

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

func NewScanner

func NewScanner(pkg *packagesx.Package) *Scanner

func (*Scanner) Options

func (s *Scanner) Options(typeName *types.TypeName) (Options, bool)

When TypeName have multi const values, this TypeName should be a enum

Jump to

Keyboard shortcuts

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