From 64323fe02680571e230913255d5da144c8548f10 Mon Sep 17 00:00:00 2001 From: wangjin Date: Thu, 12 Sep 2024 20:02:16 +0800 Subject: [PATCH] update text/templates/README --- text/templates/README.md | 252 +++++++++++++++++++-------------------- text/templates/funcs.go | 112 ++++++++--------- 2 files changed, 180 insertions(+), 184 deletions(-) diff --git a/text/templates/README.md b/text/templates/README.md index 79decf0..da76aa7 100644 --- a/text/templates/README.md +++ b/text/templates/README.md @@ -1,87 +1,83 @@ # API Reference -

Function

-

_

+

_

`_` is a no-op function that returns an empty string. It's useful to place a newline in the template. Example: @@ -93,8 +89,8 @@ Example: {{- end}} ``` -

Convert

-

bool

+

Convert

+

bool

`bool` converts a value to a boolean. Example: @@ -109,7 +105,7 @@ true false ``` -

float

+

float

`float` converts a value to a float. Example: @@ -124,7 +120,7 @@ Output: 42 ``` -

int

+

int

`int` converts a value to an integer. Example: @@ -139,7 +135,7 @@ Output: 3 ``` -

string

+

string

`string` converts a value to a string. Example: @@ -154,8 +150,8 @@ Output: true ``` -

Date

-

now

+

Date

+

now

`now` returns the current time. Example: @@ -168,7 +164,7 @@ Output: 2024-09-12 15:04:05.999999999 +0000 UTC ``` -

parseTime

+

parseTime

`parseTime` parses a time string using the specified layout. - **Parameters**: (_layout_: string, _value_: string) @@ -183,8 +179,8 @@ Output: 2024-09-12 00:00:00 +0000 UTC ``` -

Encoding

-

b64dec

+

Encoding

+

b64dec

`b64dec` decodes a base64 encoded string. Example: @@ -197,7 +193,7 @@ Output: Hello, World! ``` -

b64enc

+

b64enc

`b64enc` encodes a string to base64. Example: @@ -210,8 +206,8 @@ Output: SGVsbG8sIFdvcmxkIQ== ``` -

List

-

first

+

List

+

first

`first` returns the first element of a list or string. Example: @@ -226,7 +222,7 @@ Output: h ``` -

includes

+

includes

`includes` checks if an item is present in a list, map, or string. - **Parameters**: (_item_: any, _collection_: slice | map | string) @@ -244,7 +240,7 @@ true true ``` -

last

+

last

`last` returns the last element of a list or string. Example: @@ -259,7 +255,7 @@ Output: o ``` -

list

+

list

`list` creates a list from the given arguments. Example: @@ -272,7 +268,7 @@ Output: [1 2 3] ``` -

map

+

map

`map` maps a list of values using the given function and returns a list of results. - **Parameters**: (_fn_: function, _list_: slice) @@ -289,7 +285,7 @@ Output: [X B C] ``` -

reverse

+

reverse

`reverse` reverses a list or string. Example: @@ -304,7 +300,7 @@ Output: olleh ``` -

sort

+

sort

`sort` sorts a list of numbers or strings. Example: @@ -319,7 +315,7 @@ Output: [apple banana cherry] ``` -

uniq

+

uniq

`uniq` removes duplicate elements from a list. Example: @@ -332,8 +328,8 @@ Output: [1 2 3] ``` -

Math

-

add

+

Math

+

add

`add` adds two numbers. - **Parameters**: (_a_: number, _b_: number) @@ -348,7 +344,7 @@ Output: 5 ``` -

ceil

+

ceil

`ceil` returns the least integer value greater than or equal to the input. Example: @@ -361,7 +357,7 @@ Output: 4 ``` -

floor

+

floor

`floor` returns the greatest integer value less than or equal to the input. Example: @@ -374,7 +370,7 @@ Output: 3 ``` -

max

+

max

`max` returns the maximum of a list of numbers. - **Parameters**: numbers (variadic) @@ -389,7 +385,7 @@ Output: 9 ``` -

min

+

min

`min` returns the minimum of a list of numbers. - **Parameters**: numbers (variadic) @@ -404,7 +400,7 @@ Output: 1 ``` -

mod

+

mod

`mod` returns the modulus of dividing the first number by the second. - **Parameters**: (_a_: number, _b_: number) @@ -419,7 +415,7 @@ Output: 2 ``` -

mul

+

mul

`mul` multiplies two numbers. - **Parameters**: (_a_: number, _b_: number) @@ -434,7 +430,7 @@ Output: 6 ``` -

quo

+

quo

`quo` divides the first number by the second. - **Parameters**: (_a_: number, _b_: number) @@ -449,7 +445,7 @@ Output: 2 ``` -

rem

+

rem

`rem` returns the remainder of dividing the first number by the second. - **Parameters**: (_a_: number, _b_: number) @@ -464,7 +460,7 @@ Output: 1 ``` -

round

+

round

`round` rounds a number to a specified number of decimal places. - **Parameters**: (_precision_: integer, _value_: number) @@ -479,7 +475,7 @@ Output: 3.14 ``` -

sub

+

sub

`sub` subtracts the second number from the first. - **Parameters**: (_a_: number, _b_: number) @@ -494,8 +490,8 @@ Output: 2 ``` -

Strings

-

camelCase

+

Strings

+

camelCase

`camelCase` converts a string to camelCase. Example: @@ -508,7 +504,7 @@ Output: helloWorld ``` -

capitalize

+

capitalize

`capitalize` capitalizes the first character of a string. Example: @@ -521,7 +517,7 @@ Output: Hello ``` -

center

+

center

`center` centers a string in a field of a given width. - **Parameters**: (_width_: int, _target_: string) @@ -536,7 +532,7 @@ Output: " Hello " ``` -

hasPrefix

+

hasPrefix

`hasPrefix` checks if a string starts with a given prefix. - **Parameters**: (_prefix_: string, _target_: string) @@ -552,7 +548,7 @@ Output: true ``` -

hasSuffix

+

hasSuffix

`hasSuffix` checks if a string ends with a given suffix. - **Parameters**: (_suffix_: string, _target_: string) @@ -568,7 +564,7 @@ Output: true ``` -

html

+

html

`html` escapes special characters in a string for use in HTML. Example: @@ -581,7 +577,7 @@ Output: <script>alert('XSS')</script> ``` -

join

+

join

`join` joins a slice of strings with a separator. - **Parameters**: (_separator_: string, _values_: slice of strings) @@ -597,7 +593,7 @@ Output: apple-banana-cherry ``` -

kebabCase

+

kebabCase

`kebabCase` converts a string to kebab-case. Example: @@ -610,7 +606,7 @@ Output: hello-world ``` -

lower

+

lower

`lower` converts a string to lowercase. Example: @@ -623,7 +619,7 @@ Output: hello ``` -

matchRegex

+

matchRegex

`matchRegex` checks if a string matches a regular expression. - **Parameters**: (_pattern_: string, _target_: string) @@ -639,7 +635,7 @@ Output: true ``` -

pascalCase

+

pascalCase

`pascalCase` converts a string to PascalCase. Example: @@ -652,7 +648,7 @@ Output: HelloWorld ``` -

quote

+

quote

`quote` returns a double-quoted string. Example: @@ -667,7 +663,7 @@ hello "hello" ``` -

repeat

+

repeat

`repeat` repeats a string a specified number of times. - **Parameters**: (_count_: int, _target_: string) @@ -682,7 +678,7 @@ Output: abcabcabc ``` -

replace

+

replace

`replace` replaces all occurrences of a substring with another substring. - **Parameters**: (_old_: string, _new_: string, _target_: string) @@ -697,7 +693,7 @@ Output: hell0 w0rld ``` -

replaceN

+

replaceN

`replaceN` replaces the first n occurrences of a substring with another substring. - **Parameters**: (_old_: string, _new_: string, _n_: int, _target_: string) @@ -712,7 +708,7 @@ Output: hell0 world ``` -

snakeCase

+

snakeCase

`snakeCase` converts a string to snake_case. Example: @@ -725,7 +721,7 @@ Output: hello_world ``` -

split

+

split

`split` splits a string by a separator. - **Parameters**: (_separator_: string, _target_: string) @@ -741,7 +737,7 @@ Output: [apple banana cherry] ``` -

striptags

+

striptags

`striptags` removes HTML tags from a string. Example: @@ -754,7 +750,7 @@ Output: Hello World! ``` -

substr

+

substr

`substr` extracts a substring from a string. - **Parameters**: (_start_: int, _length_: int, _target_: string) @@ -769,7 +765,7 @@ Output: Hello ``` -

trim

+

trim

`trim` removes leading and trailing whitespace from a string. Example: @@ -782,7 +778,7 @@ Output: hello ``` -

trimPrefix

+

trimPrefix

`trimPrefix` removes a prefix from a string if it exists. - **Parameters**: (_prefix_: string, _target_: string) @@ -797,7 +793,7 @@ Output: World! ``` -

trimSuffix

+

trimSuffix

`trimSuffix` removes a suffix from a string if it exists. - **Parameters**: (_suffix_: string, _target_: string) @@ -812,7 +808,7 @@ Output: Hello ``` -

truncate

+

truncate

`truncate` truncates a string to a specified length and adds a suffix if truncated. - **Parameters**: (_length_: int, _suffix_: string, _target_: string) @@ -827,7 +823,7 @@ Output: This is a... ``` -

unquote

+

unquote

`unquote` returns an unquoted string. Example: @@ -840,7 +836,7 @@ Output: hello ``` -

upper

+

upper

`upper` converts a string to uppercase. Example: @@ -853,7 +849,7 @@ Output: HELLO ``` -

urlEscape

+

urlEscape

`urlEscape` escapes a string for use in a URL query. Example: @@ -866,7 +862,7 @@ Output: hello+world ``` -

urlUnescape

+

urlUnescape

`urlUnescape` unescapes a URL query string. Example: @@ -879,7 +875,7 @@ Output: hello world ``` -

wordwrap

+

wordwrap

`wordwrap` wraps words in a string to a specified width. - **Parameters**: (_width_: int, _target_: string) diff --git a/text/templates/funcs.go b/text/templates/funcs.go index 6012c93..d5521dd 100644 --- a/text/templates/funcs.go +++ b/text/templates/funcs.go @@ -193,7 +193,7 @@ func stringFunc(name string, f func(string) (string, error)) Func { // Funcs is a map of utility functions for use in templates var Funcs = map[string]any{ - // @api(Function/_) is a no-op function that returns an empty string. + // @api(_) is a no-op function that returns an empty string. // It's useful to place a newline in the template. // // Example: @@ -208,7 +208,7 @@ var Funcs = map[string]any{ // String functions - // @api(Function/Strings/quote) returns a double-quoted string. + // @api(Strings/quote) returns a double-quoted string. // // Example: // ``` @@ -223,7 +223,7 @@ var Funcs = map[string]any{ // ``` "quote": Chain(stringFunc("quote", noError(strconv.Quote))), - // @api(Function/Strings/unquote) returns an unquoted string. + // @api(Strings/unquote) returns an unquoted string. // // Example: // ``` @@ -236,7 +236,7 @@ var Funcs = map[string]any{ // ``` "unquote": Chain(stringFunc("unquote", strconv.Unquote)), - // @api(Function/Strings/capitalize) capitalizes the first character of a string. + // @api(Strings/capitalize) capitalizes the first character of a string. // // Example: // ``` @@ -249,7 +249,7 @@ var Funcs = map[string]any{ // ``` "capitalize": Chain(stringFunc("capitalize", noError(capitalize))), - // @api(Function/Strings/lower) converts a string to lowercase. + // @api(Strings/lower) converts a string to lowercase. // // Example: // ``` @@ -262,7 +262,7 @@ var Funcs = map[string]any{ // ``` "lower": Chain(stringFunc("lower", noError(strings.ToLower))), - // @api(Function/Strings/upper) converts a string to uppercase. + // @api(Strings/upper) converts a string to uppercase. // // Example: // ``` @@ -275,7 +275,7 @@ var Funcs = map[string]any{ // ``` "upper": Chain(stringFunc("upper", noError(strings.ToUpper))), - // @api(Function/Strings/replace) replaces all occurrences of a substring with another substring. + // @api(Strings/replace) replaces all occurrences of a substring with another substring. // // - **Parameters**: (_old_: string, _new_: string, _target_: string) // @@ -290,7 +290,7 @@ var Funcs = map[string]any{ // ``` "replace": Chain3(replace), - // @api(Function/Strings/replaceN) replaces the first n occurrences of a substring with another substring. + // @api(Strings/replaceN) replaces the first n occurrences of a substring with another substring. // // - **Parameters**: (_old_: string, _new_: string, _n_: int, _target_: string) // @@ -305,7 +305,7 @@ var Funcs = map[string]any{ // ``` "replaceN": Chain4(replaceN), - // @api(Function/Strings/trim) removes leading and trailing whitespace from a string. + // @api(Strings/trim) removes leading and trailing whitespace from a string. // // Example: // ``` @@ -318,7 +318,7 @@ var Funcs = map[string]any{ // ``` "trim": Chain(stringFunc("trim", noError(strings.TrimSpace))), - // @api(Function/Strings/trimPrefix) removes a prefix from a string if it exists. + // @api(Strings/trimPrefix) removes a prefix from a string if it exists. // // - **Parameters**: (_prefix_: string, _target_: string) // @@ -333,7 +333,7 @@ var Funcs = map[string]any{ // ``` "trimPrefix": Chain2(trimPrefix), - // @api(Function/Strings/hasPrefix) checks if a string starts with a given prefix. + // @api(Strings/hasPrefix) checks if a string starts with a given prefix. // // - **Parameters**: (_prefix_: string, _target_: string) // - **Returns**: bool @@ -349,7 +349,7 @@ var Funcs = map[string]any{ // ``` "hasPrefix": Chain2(hasPrefix), - // @api(Function/Strings/trimSuffix) removes a suffix from a string if it exists. + // @api(Strings/trimSuffix) removes a suffix from a string if it exists. // // - **Parameters**: (_suffix_: string, _target_: string) // @@ -364,7 +364,7 @@ var Funcs = map[string]any{ // ``` "trimSuffix": Chain2(trimSuffix), - // @api(Function/Strings/hasSuffix) checks if a string ends with a given suffix. + // @api(Strings/hasSuffix) checks if a string ends with a given suffix. // // - **Parameters**: (_suffix_: string, _target_: string) // - **Returns**: bool @@ -380,7 +380,7 @@ var Funcs = map[string]any{ // ``` "hasSuffix": Chain2(hasSuffix), - // @api(Function/Strings/split) splits a string by a separator. + // @api(Strings/split) splits a string by a separator. // // - **Parameters**: (_separator_: string, _target_: string) // - **Returns**: slice of strings @@ -396,7 +396,7 @@ var Funcs = map[string]any{ // ``` "split": Chain2(split), - // @api(Function/Strings/join) joins a slice of strings with a separator. + // @api(Strings/join) joins a slice of strings with a separator. // // - **Parameters**: (_separator_: string, _values_: slice of strings) // - **Returns**: string @@ -412,7 +412,7 @@ var Funcs = map[string]any{ // ``` "join": Chain2(join), - // @api(Function/Strings/striptags) removes HTML tags from a string. + // @api(Strings/striptags) removes HTML tags from a string. // // Example: // ``` @@ -425,7 +425,7 @@ var Funcs = map[string]any{ // ``` "striptags": Chain(stringFunc("striptags", striptags)), - // @api(Function/Strings/substr) extracts a substring from a string. + // @api(Strings/substr) extracts a substring from a string. // // - **Parameters**: (_start_: int, _length_: int, _target_: string) // @@ -440,7 +440,7 @@ var Funcs = map[string]any{ // ``` "substr": Chain3(substr), - // @api(Function/Strings/repeat) repeats a string a specified number of times. + // @api(Strings/repeat) repeats a string a specified number of times. // // - **Parameters**: (_count_: int, _target_: string) // @@ -455,7 +455,7 @@ var Funcs = map[string]any{ // ``` "repeat": Chain2(repeat), - // @api(Function/Strings/camelCase) converts a string to camelCase. + // @api(Strings/camelCase) converts a string to camelCase. // // Example: // ``` @@ -468,7 +468,7 @@ var Funcs = map[string]any{ // ``` "camelCase": Chain(stringFunc("camelCase", noError(camelCase))), - // @api(Function/Strings/pascalCase) converts a string to PascalCase. + // @api(Strings/pascalCase) converts a string to PascalCase. // // Example: // ``` @@ -481,7 +481,7 @@ var Funcs = map[string]any{ // ``` "pascalCase": Chain(stringFunc("pascalCase", noError(pascalCase))), - // @api(Function/Strings/snakeCase) converts a string to snake_case. + // @api(Strings/snakeCase) converts a string to snake_case. // // Example: // ``` @@ -494,7 +494,7 @@ var Funcs = map[string]any{ // ``` "snakeCase": Chain(stringFunc("snakeCase", noError(snakeCase))), - // @api(Function/Strings/kebabCase) converts a string to kebab-case. + // @api(Strings/kebabCase) converts a string to kebab-case. // // Example: // ``` @@ -507,7 +507,7 @@ var Funcs = map[string]any{ // ``` "kebabCase": Chain(stringFunc("kebabCase", noError(kebabCase))), - // @api(Function/Strings/truncate) truncates a string to a specified length and adds a suffix if truncated. + // @api(Strings/truncate) truncates a string to a specified length and adds a suffix if truncated. // // - **Parameters**: (_length_: int, _suffix_: string, _target_: string) // @@ -522,7 +522,7 @@ var Funcs = map[string]any{ // ``` "truncate": Chain3(truncate), - // @api(Function/Strings/wordwrap) wraps words in a string to a specified width. + // @api(Strings/wordwrap) wraps words in a string to a specified width. // // - **Parameters**: (_width_: int, _target_: string) // @@ -541,7 +541,7 @@ var Funcs = map[string]any{ // ``` "wordwrap": Chain2(wordwrap), - // @api(Function/Strings/center) centers a string in a field of a given width. + // @api(Strings/center) centers a string in a field of a given width. // // - **Parameters**: (_width_: int, _target_: string) // @@ -556,7 +556,7 @@ var Funcs = map[string]any{ // ``` "center": Chain2(center), - // @api(Function/Strings/matchRegex) checks if a string matches a regular expression. + // @api(Strings/matchRegex) checks if a string matches a regular expression. // // - **Parameters**: (_pattern_: string, _target_: string) // - **Returns**: bool @@ -572,7 +572,7 @@ var Funcs = map[string]any{ // ``` "matchRegex": Chain2(matchRegex), - // @api(Function/Strings/html) escapes special characters in a string for use in HTML. + // @api(Strings/html) escapes special characters in a string for use in HTML. // // Example: // ``` @@ -585,7 +585,7 @@ var Funcs = map[string]any{ // ``` "html": Chain(stringFunc("html", noError(html.EscapeString))), - // @api(Function/Strings/urlEscape) escapes a string for use in a URL query. + // @api(Strings/urlEscape) escapes a string for use in a URL query. // // Example: // ``` @@ -598,7 +598,7 @@ var Funcs = map[string]any{ // ``` "urlEscape": Chain(stringFunc("urlEscape", noError(url.QueryEscape))), - // @api(Function/Strings/urlUnescape) unescapes a URL query string. + // @api(Strings/urlUnescape) unescapes a URL query string. // // Example: // ``` @@ -613,7 +613,7 @@ var Funcs = map[string]any{ // Encoding functions - // @api(Function/Encoding/b64enc) encodes a string to base64. + // @api(Encoding/b64enc) encodes a string to base64. // // Example: // ``` @@ -626,7 +626,7 @@ var Funcs = map[string]any{ // ``` "b64enc": Chain(stringFunc("b64enc", noError(b64enc))), - // @api(Function/Encoding/b64dec) decodes a base64 encoded string. + // @api(Encoding/b64dec) decodes a base64 encoded string. // // Example: // ``` @@ -641,7 +641,7 @@ var Funcs = map[string]any{ // List functions - // @api(Function/List/map) maps a list of values using the given function and returns a list of results. + // @api(List/map) maps a list of values using the given function and returns a list of results. // // - **Parameters**: (_fn_: function, _list_: slice) // @@ -658,7 +658,7 @@ var Funcs = map[string]any{ // ``` "map": Chain2(Map), - // @api(Function/List/list) creates a list from the given arguments. + // @api(List/list) creates a list from the given arguments. // // Example: // ``` @@ -671,7 +671,7 @@ var Funcs = map[string]any{ // ``` "list": list, - // @api(Function/List/first) returns the first element of a list or string. + // @api(List/first) returns the first element of a list or string. // // Example: // ``` @@ -686,7 +686,7 @@ var Funcs = map[string]any{ // ``` "first": Chain(first), - // @api(Function/List/last) returns the last element of a list or string. + // @api(List/last) returns the last element of a list or string. // // Example: // ``` @@ -701,7 +701,7 @@ var Funcs = map[string]any{ // ``` "last": Chain(last), - // @api(Function/List/reverse) reverses a list or string. + // @api(List/reverse) reverses a list or string. // // Example: // ``` @@ -716,7 +716,7 @@ var Funcs = map[string]any{ // ``` "reverse": Chain(reverse), - // @api(Function/List/sort) sorts a list of numbers or strings. + // @api(List/sort) sorts a list of numbers or strings. // // Example: // ``` @@ -731,7 +731,7 @@ var Funcs = map[string]any{ // ``` "sort": Chain(sortSlice), - // @api(Function/List/uniq) removes duplicate elements from a list. + // @api(List/uniq) removes duplicate elements from a list. // // Example: // ``` @@ -744,7 +744,7 @@ var Funcs = map[string]any{ // ``` "uniq": Chain(uniq), - // @api(Function/List/includes) checks if an item is present in a list, map, or string. + // @api(List/includes) checks if an item is present in a list, map, or string. // // - **Parameters**: (_item_: any, _collection_: slice | map | string) // - **Returns**: bool @@ -764,7 +764,7 @@ var Funcs = map[string]any{ // Math functions - // @api(Function/Math/add) adds two numbers. + // @api(Math/add) adds two numbers. // // - **Parameters**: (_a_: number, _b_: number) // @@ -779,7 +779,7 @@ var Funcs = map[string]any{ // ``` "add": Chain2(add), - // @api(Function/Math/sub) subtracts the second number from the first. + // @api(Math/sub) subtracts the second number from the first. // // - **Parameters**: (_a_: number, _b_: number) // @@ -794,7 +794,7 @@ var Funcs = map[string]any{ // ``` "sub": Chain2(sub), - // @api(Function/Math/mul) multiplies two numbers. + // @api(Math/mul) multiplies two numbers. // // - **Parameters**: (_a_: number, _b_: number) // @@ -809,7 +809,7 @@ var Funcs = map[string]any{ // ``` "mul": Chain2(mul), - // @api(Function/Math/quo) divides the first number by the second. + // @api(Math/quo) divides the first number by the second. // // - **Parameters**: (_a_: number, _b_: number) // @@ -824,7 +824,7 @@ var Funcs = map[string]any{ // ``` "quo": Chain2(quo), - // @api(Function/Math/rem) returns the remainder of dividing the first number by the second. + // @api(Math/rem) returns the remainder of dividing the first number by the second. // // - **Parameters**: (_a_: number, _b_: number) // @@ -839,7 +839,7 @@ var Funcs = map[string]any{ // ``` "rem": Chain2(rem), - // @api(Function/Math/mod) returns the modulus of dividing the first number by the second. + // @api(Math/mod) returns the modulus of dividing the first number by the second. // // - **Parameters**: (_a_: number, _b_: number) // @@ -854,7 +854,7 @@ var Funcs = map[string]any{ // ``` "mod": Chain2(mod), - // @api(Function/Math/ceil) returns the least integer value greater than or equal to the input. + // @api(Math/ceil) returns the least integer value greater than or equal to the input. // // Example: // ``` @@ -867,7 +867,7 @@ var Funcs = map[string]any{ // ``` "ceil": Chain(ceil), - // @api(Function/Math/floor) returns the greatest integer value less than or equal to the input. + // @api(Math/floor) returns the greatest integer value less than or equal to the input. // // Example: // ``` @@ -880,7 +880,7 @@ var Funcs = map[string]any{ // ``` "floor": Chain(floor), - // @api(Function/Math/round) rounds a number to a specified number of decimal places. + // @api(Math/round) rounds a number to a specified number of decimal places. // // - **Parameters**: (_precision_: integer, _value_: number) // @@ -895,7 +895,7 @@ var Funcs = map[string]any{ // ``` "round": Chain2(round), - // @api(Function/Math/min) returns the minimum of a list of numbers. + // @api(Math/min) returns the minimum of a list of numbers. // // - **Parameters**: numbers (variadic) // @@ -910,7 +910,7 @@ var Funcs = map[string]any{ // ``` "min": minFunc, - // @api(Function/Math/max) returns the maximum of a list of numbers. + // @api(Math/max) returns the maximum of a list of numbers. // // - **Parameters**: numbers (variadic) // @@ -927,7 +927,7 @@ var Funcs = map[string]any{ // Type conversion functions - // @api(Function/Convert/int) converts a value to an integer. + // @api(Convert/int) converts a value to an integer. // // Example: // ``` @@ -942,7 +942,7 @@ var Funcs = map[string]any{ // ``` "int": Chain(toInt64), - // @api(Function/Convert/float) converts a value to a float. + // @api(Convert/float) converts a value to a float. // // Example: // ``` @@ -957,7 +957,7 @@ var Funcs = map[string]any{ // ``` "float": Chain(toFloat64), - // @api(Function/Convert/string) converts a value to a string. + // @api(Convert/string) converts a value to a string. // // Example: // ``` @@ -972,7 +972,7 @@ var Funcs = map[string]any{ // ``` "string": Chain(toString), - // @api(Function/Convert/bool) converts a value to a boolean. + // @api(Convert/bool) converts a value to a boolean. // // Example: // ``` @@ -989,7 +989,7 @@ var Funcs = map[string]any{ // Date functions - // @api(Function/Date/now) returns the current time. + // @api(Date/now) returns the current time. // // Example: // ``` @@ -1002,7 +1002,7 @@ var Funcs = map[string]any{ // ``` "now": time.Now, - // @api(Function/Date/parseTime) parses a time string using the specified layout. + // @api(Date/parseTime) parses a time string using the specified layout. // // - **Parameters**: (_layout_: string, _value_: string) //