Skip to content

Commit ecf17b5

Browse files
committed
fix typos
1 parent 1c37c81 commit ecf17b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

text/templates/funcs.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ func trimPrefix(prefix string, v String) (String, error) {
12831283
return reflect.ValueOf(strings.TrimPrefix(s, prefix)), nil
12841284
}
12851285

1286-
func hasPrefix(prefix string, v String) (String, error) {
1286+
func hasPrefix(prefix string, v String) (Bool, error) {
12871287
s, ok := asString(v)
12881288
if !ok {
12891289
return null, fmt.Errorf("hasPrefix: expected string as second argument, got %s", v.Type())
@@ -1299,7 +1299,7 @@ func trimSuffix(suffix string, v String) (String, error) {
12991299
return reflect.ValueOf(strings.TrimSuffix(s, suffix)), nil
13001300
}
13011301

1302-
func hasSuffix(suffix string, v String) (String, error) {
1302+
func hasSuffix(suffix string, v String) (Bool, error) {
13031303
s, ok := asString(v)
13041304
if !ok {
13051305
return null, fmt.Errorf("hasSuffix: expected string as second argument, got %s", v.Type())
@@ -1884,6 +1884,10 @@ func isFloat(v Any) bool {
18841884
}
18851885
}
18861886

1887+
func isInteger(v Any) bool {
1888+
return isInt(v) || isUint(v)
1889+
}
1890+
18871891
func isNumber(v Any) bool {
18881892
return isInt(v) || isUint(v) || isFloat(v)
18891893
}

0 commit comments

Comments
 (0)