models

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token string

Token is a source code token.

Token is used to add a particular piece of source code to the AST.

const (
	MuxToken                Token = "_mux"
	HandlerToken            Token = "http.Handler"
	NewMuxToken             Token = "http.NewServeMux"
	HandleFuncToken         Token = "HandleFunc"
	InitToken               Token = "init"
	WToken                  Token = "w"
	WriterToken             Token = "http.ResponseWriter"
	RToken                  Token = "r"
	RequestToken            Token = "*http.Request"
	PathValueGetToken       Token = "r.PathValue"
	QueryValueGetToken      Token = "r.URL.Query().Get"
	UnmarshalErrSuffixToken Token = "UnmarshalErr"
	BodyToken               Token = "_body"
	BodyGetToken            Token = "io.ReadAll(r.Body)"
	BodyReadErrToken        Token = "_bodyReadErr"
	BodyTypeToken           Token = "_bodyType"
	BodyValueToken          Token = "_bodyValue"
	ResultTypeToken         Token = "_resultType"
	ResultValueToken        Token = "_resultValue"
	ErrToken                Token = "err"
	NilToken                Token = "nil"
	ReturnToken             Token = "return"
	InlineFieldToken        Token = "`json:\",inline\"`"
	StatusOkToken           Token = "http.StatusOK"
	StatusOkTextToken       Token = "http.StatusText(http.StatusOK)"
)

func (Token) AstExpr

func (t Token) AstExpr() astm.Expr

AstExpr returns the token as an AST expression.

func (Token) String

func (t Token) String() string

String returns the token as a string.

Jump to

Keyboard shortcuts

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