Documentation
¶
Overview ¶
Package typecheck provides type-checking predicates for common Go types used in Datapages handler signatures.
Index ¶
- func EventTypeNameOf(expr ast.Expr, info *types.Info, eventTypeNames map[string]struct{}) (string, bool)
- func IsBool(t types.Type) bool
- func IsError(t types.Type) bool
- func IsInt(t types.Type) bool
- func IsPtrToDatastarSSE(expr ast.Expr, info *types.Info) bool
- func IsPtrToNetHTTPReq(expr ast.Expr, info *types.Info) bool
- func IsSessionType(expr ast.Expr, info *types.Info) bool
- func IsString(t types.Type) bool
- func IsTemplComponent(t types.Type) bool
- func IsTimeTime(t types.Type) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventTypeNameOf ¶
func EventTypeNameOf( expr ast.Expr, info *types.Info, eventTypeNames map[string]struct{}, ) (string, bool)
EventTypeNameOf returns the EventXXX type name for expr if it is (or points to) a named type whose name is in eventTypeNames.
func IsPtrToDatastarSSE ¶
IsPtrToDatastarSSE reports whether expr resolves to *datastar.ServerSentEventGenerator.
func IsPtrToNetHTTPReq ¶
IsPtrToNetHTTPReq reports whether expr resolves to *net/http.Request.
func IsSessionType ¶
IsSessionType reports whether expr resolves to a named type called "Session".
func IsTemplComponent ¶
IsTemplComponent reports whether t is github.com/a-h/templ.Component.
func IsTimeTime ¶
IsTimeTime reports whether t is time.Time from the standard library.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.