MCPcopy Create free account

hub / github.com/canopyclimate/golive / functions

Functions1,499 in github.com/canopyclimate/golive

FunctionExampleTemplate_func
This example demonstrates a custom function to process template text. It installs the strings.Title function and uses it to Make Title Text Look Good
internal/text/template/examplefunc_test.go:17
FunctionExampleTemplate_glob
The following example is duplicated in text/template; keep them in sync. Here we demonstrate loading a set of templates from a directory.
htmltmpl/examplefiles_test.go:44
FunctionExampleTemplate_glob
Here we demonstrate loading a set of templates from a directory.
internal/text/template/examplefiles_test.go:41
FunctionExampleTemplate_helpers
The following example is duplicated in text/template; keep them in sync. This example demonstrates one way to share some templates and use them in dif
htmltmpl/examplefiles_test.go:118
FunctionExampleTemplate_helpers
This example demonstrates one way to share some templates and use them in different contexts. In this variant we add multiple driver templates by hand
internal/text/template/examplefiles_test.go:75
FunctionExampleTemplate_parsefiles
Here we demonstrate loading a set of templates from files in different directories
htmltmpl/examplefiles_test.go:76
FunctionExampleTemplate_share
The following example is duplicated in text/template; keep them in sync. This example demonstrates how to use one group of driver templates with disti
htmltmpl/examplefiles_test.go:166
FunctionExampleTemplate_share
This example demonstrates how to use one group of driver templates with distinct sets of helper templates.
internal/text/template/examplefiles_test.go:121
FunctionExample_autoescaping
()
htmltmpl/example_test.go:85
FunctionExample_escape
()
htmltmpl/example_test.go:99
FunctionFileInputTag
FileInputTag renders a file input tag for uploading files to a View.
live/funcs.go:99
FunctionFuzz
(in []byte)
internal/tmpl/fuzz/fuzz.go:9
FunctionFuzz
(f *testing.F)
internal/tmpl/fuzz/fuzz_test.go:9
FunctionFuzzPhxParse
(f *testing.F)
live/internal/phx/fuzz_test.go:27
FunctionFuzzTreeSerialization
(f *testing.F)
internal/tmpl/tree_test.go:271
FunctionFuzzUploadMsgUnmarshalBinary
(f *testing.F)
live/internal/phx/fuzz_test.go:8
MethodGetU
A few methods to test chaining.
htmltmpl/exec_test.go:245
MethodGetU
A few methods to test chaining.
internal/text/template/exec_test.go:241
FunctionGetView
GetView returns the View of type T corresponding to r. If no such view has been set, returns the zero value for T.
live/route.go:46
FunctionHTMLEscape
Forwarding functions so that clients need only import this package to reach the general escaping functions of text/template. HTMLEscape writes to w th
htmltmpl/escape.go:974
FunctionHTMLEscapeString
HTMLEscapeString returns the escaped HTML equivalent of the plain text data s.
htmltmpl/escape.go:979
FunctionHTMLEscaper
HTMLEscaper returns the escaped HTML equivalent of the textual representation of its arguments.
htmltmpl/escape.go:985
MethodHandleEvent
(ctx context.Context, e *live.Event)
examples/main.go:195
MethodHandleEvent
(ctx context.Context, e *live.Event)
examples/main.go:319
MethodHandleEvent
(ctx context.Context, e *live.Event)
examples/main.go:366
MethodHandleEvent
(ctx context.Context, e *live.Event)
examples/main.go:424
MethodHandleEvent
(ctx context.Context, e *live.Event)
examples/main.go:515
MethodHandleInfo
(ctx context.Context, ci *live.Info)
examples/main.go:189
MethodHandleInfo
(ctx context.Context, e *live.Info)
examples/main.go:525
MethodHandleParams
(ctx context.Context, url *url.URL)
examples/main.go:291
MethodHandleParams
(ctx context.Context, url *url.URL)
examples/main.go:529
MethodHasError
(string)
changeset/changeset.go:36
MethodHasError
HasError returns true if Error(key) returns a non-nil error
changeset/changeset.go:174
MethodHeader
()
live/route.go:19
MethodHideModal
()
examples/main.go:490
FunctionImagePreviewTag
ImagePreviewTag renders a preview image for a file upload.
live/funcs.go:146
FunctionInputTag
InputTag renders an input tag with the given key and value for the provided changeset.
changeset/funcs.go:29
FunctionIsTrue
IsTrue reports whether the value is 'true', in the sense of not the zero of its type, and whether the value has a meaningful truth value. This is the
htmltmpl/template.go:484
FunctionJSEscape
JSEscape writes to w the escaped JavaScript equivalent of the plain text data b.
htmltmpl/escape.go:990
FunctionJSEscaper
JSEscaper returns the escaped JavaScript equivalent of the textual representation of its arguments.
htmltmpl/escape.go:1001
MethodJSON
()
live/internal/phx/reply.go:191
MethodJSON
()
live/internal/phx/reply.go:199
MethodLess
(i, j int)
internal/fmtsort/sort.go:27
FunctionLiveViewTag
LiveView renders a container for a live.View - required for layoutTemplates.
live/funcs.go:82
MethodMAdd
(a int, b []int)
htmltmpl/exec_test.go:226
MethodMAdd
(a int, b []int)
internal/text/template/exec_test.go:222
FunctionMakeView
MakeView will either get the existing View of type T associated with r or create a View of type T. If r is not a LiveView-enabled request, returns the
live/route.go:62
MethodMarshalJSON
()
htmltmpl/escape_test.go:21
MethodMarshalJSON
()
htmltmpl/escape_test.go:28
MethodMarshalJSON
()
live/js.go:94
MethodMarshalJSON
()
live/js.go:127
MethodMarshalJSON
()
live/js.go:159
MethodMarshalJSON
()
live/js.go:198
MethodMarshalJSON
()
live/internal/phx/reply.go:195
MethodMarshalJSON
()
live/internal/phx/reply.go:215
MethodMethod0
()
htmltmpl/exec_test.go:96
MethodMethod0
()
htmltmpl/exec_test.go:182
MethodMethod0
Simple methods with and without arguments.
htmltmpl/exec_test.go:204
MethodMethod0
()
internal/text/template/exec_test.go:92
MethodMethod0
()
internal/text/template/exec_test.go:178
MethodMethod0
Simple methods with and without arguments.
internal/text/template/exec_test.go:200
MethodMethod1
(a int)
htmltmpl/exec_test.go:208
MethodMethod1
(a int)
internal/text/template/exec_test.go:204
MethodMethod2
(a uint16, b string)
htmltmpl/exec_test.go:212
MethodMethod2
(a uint16, b string)
internal/text/template/exec_test.go:208
MethodMethod3
(v any)
htmltmpl/exec_test.go:216
MethodMethod3
(v any)
internal/text/template/exec_test.go:212
MethodMiddleware
(next http.Handler)
live/liveview.go:73
MethodMount
(ctx context.Context, p live.Params)
examples/main.go:172
MethodMount
(ctx context.Context, p live.Params)
examples/main.go:280
MethodMount
(ctx context.Context, p live.Params)
examples/main.go:403
MethodMount
(ctx context.Context, p live.Params)
examples/main.go:503
MethodMyError
MyError returns a value and an error according to its argument.
htmltmpl/exec_test.go:237
MethodMyError
MyError returns a value and an error according to its argument.
internal/text/template/exec_test.go:233
MethodName
Name returns the name of the setting.
internal/godebug/godebug.go:14
FunctionNavigation
Navigation renders "live" navigation links that support navigating without a page refresh.
live/funcs.go:43
FunctionNew
New returns a new Changeset of type T using the Config and initilizes the Changeset with the given initial values.
changeset/changeset.go:86
FunctionNewHTTPHandler
NewHTTPHandler returns a new HTTPHandler with the given config
live/liveview.go:830
MethodPageTitleConfig
()
examples/main.go:305
MethodPosition
()
internal/text/template/parse/node.go:43
FunctionPushNav
PushNav supports push patching and push redirecting from server to View
live/liveview.go:866
MethodRecur
()
htmltmpl/exec_test.go:1795
MethodRemoveError
(string)
changeset/changeset.go:35
MethodRemoveError
RemoveError removes the error for the given key returning the error at the given key or nil if there was no error.
changeset/changeset.go:192
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:238
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:301
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:338
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:375
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:412
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:508
MethodRender
(ctx context.Context, meta *live.Meta)
examples/main.go:536
MethodShowModal
()
examples/main.go:483
MethodSomeMethod
(x int)
htmltmpl/escape_test.go:1934
MethodString
()
htmltmpl/element_string.go:22
MethodString
()
htmltmpl/delim_string.go:21
MethodString
()
htmltmpl/exec_test.go:108
MethodString
()
htmltmpl/urlpart_string.go:21
MethodString
()
htmltmpl/jsctx_string.go:20
MethodString
()
htmltmpl/state_string.go:46
MethodString
()
htmltmpl/context.go:31
← previousnext →901–1,000 of 1,499, ranked by callers