internal

package
v0.0.0-...-6091203 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TagStyles       = make(tagStyles)
	TagStyleDefault edsl.TagStyle
)

Functions

func DerefStructType

func DerefStructType(val interface{}) reflect.Type

func FormatType

func FormatType(typ reflect.Type) string

func FormatTypeExpr

func FormatTypeExpr(expr ast.Expr) string

func ParseTag

func ParseTag(text string) (ret []edsl.Tag)

Types

type CommaEqSpaceTag

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

func (CommaEqSpaceTag) Entry

func (c CommaEqSpaceTag) Entry(
	key string,
	values ...interface{},
) edsl.CommaEqSpaceTag

func (CommaEqSpaceTag) EntryString

func (c CommaEqSpaceTag) EntryString(
	key string,
	values ...string,
) edsl.CommaEqSpaceTag

func (CommaEqSpaceTag) FirstKey

func (c CommaEqSpaceTag) FirstKey() string

func (CommaEqSpaceTag) Key

func (CommaEqSpaceTag) Name

func (c CommaEqSpaceTag) Name() string

func (CommaEqSpaceTag) Nil

func (CommaEqSpaceTag) Of

func (c CommaEqSpaceTag) Of(tagger edsl.Tag) edsl.Tag

func (CommaEqSpaceTag) String

func (c CommaEqSpaceTag) String() string

func (CommaEqSpaceTag) Value

func (c CommaEqSpaceTag) Value(key string) string

func (CommaEqSpaceTag) Values

func (c CommaEqSpaceTag) Values(key string) []string

type CommaTag

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

func (CommaTag) FirstKey

func (c CommaTag) FirstKey() string

func (CommaTag) Key

func (c CommaTag) Key(key string) edsl.CommaTag

func (CommaTag) Name

func (c CommaTag) Name() string

func (CommaTag) Nil

func (c CommaTag) Nil() edsl.CommaTag

func (CommaTag) Of

func (c CommaTag) Of(tagger edsl.Tag) edsl.Tag

func (CommaTag) String

func (c CommaTag) String() string

func (CommaTag) Value

func (c CommaTag) Value(string) string

func (CommaTag) Values

func (c CommaTag) Values(string) []string

type Filer

type Filer struct {
	PkgName string
	// contains filtered or unexported fields
}

func (Filer) Header

func (f Filer) Header(text string) edsl.Filer

func (Filer) Imports

func (f Filer) Imports(packages ...string) edsl.Filer

func (Filer) String

func (f Filer) String() string

func (Filer) Structs

func (f Filer) Structs(structs ...edsl.Structer) edsl.Filer

type SemiCommaTag

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

func (SemiCommaTag) Entry

func (s SemiCommaTag) Entry(key string, value interface{}) edsl.SemiColonTag

func (SemiCommaTag) FirstKey

func (s SemiCommaTag) FirstKey() string

func (SemiCommaTag) Key

func (s SemiCommaTag) Key(key string) edsl.SemiColonTag

func (SemiCommaTag) Name

func (s SemiCommaTag) Name() string

func (SemiCommaTag) Nil

func (s SemiCommaTag) Nil() edsl.SemiColonTag

func (SemiCommaTag) Of

func (s SemiCommaTag) Of(tagger edsl.Tag) edsl.Tag

func (SemiCommaTag) String

func (s SemiCommaTag) String() string

func (SemiCommaTag) Value

func (s SemiCommaTag) Value(key string) string

func (SemiCommaTag) Values

func (s SemiCommaTag) Values(key string) []string

type Structer

type Structer struct {
	Name, Comment string
	Fields        []*field
}

func (Structer) Field

func (s Structer) Field(
	name string,
	typ reflect.Type,
	comment string,
	tags ...edsl.Tag,
) edsl.Structer

func (Structer) FieldNames

func (s Structer) FieldNames() (ret []string)

func (Structer) ForEach

func (s Structer) ForEach(
	fn func(name string, typ reflect.Type, tags []edsl.Tag),
)

func (Structer) Header

func (s Structer) Header(text string) edsl.Structer

func (Structer) Interface

func (s Structer) Interface() interface{}

func (Structer) Of

func (s Structer) Of(val interface{}) edsl.Structer

func (Structer) RawTypedField

func (s Structer) RawTypedField(
	name string,
	rawType ast.Expr,
	comment string,
	tags ...edsl.Tag,
) edsl.Structer

func (Structer) String

func (s Structer) String() string

func (Structer) TagKeys

func (s Structer) TagKeys(name string) (ret []string)

func (Structer) TagValues

func (s Structer) TagValues(name, key string) (ret []string)

func (Structer) Type

func (s Structer) Type() reflect.Type

func (Structer) Value

func (s Structer) Value() reflect.Value

type Tagger

type Tagger struct{}

func (Tagger) Comma

func (Tagger) Comma(name string) edsl.CommaTag

func (Tagger) CommaEqSpace

func (Tagger) CommaEqSpace(name string) edsl.CommaEqSpaceTag

func (Tagger) SemiColon

func (t Tagger) SemiColon(name string) edsl.SemiColonTag

Jump to

Keyboard shortcuts

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