Skip to content

Commit c8f3775

Browse files
committed
docs: refine kindOf documentation
Signed-off-by: Luca Zeuch <[email protected]>
1 parent e3bd162 commit c8f3775

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

content/docs/reference/templates/functions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,12 +1402,13 @@ chaining `index` calls, e.g. `index (index $x 0) 1`.
14021402
### kindOf
14031403

14041404
```
1405-
{{ $kind := kindOf <value> [follow] }}
1405+
{{ $kind := kindOf <value> [indirect] }}
14061406
```
14071407

1408-
Returns the kind (that is, type) of the provided value.
1408+
Returns the [kind](https://pkg.go.dev/reflect#Kind) of the provided value.
14091409

1410-
If `value` is a pointer, set the `follow` argument to `true` to follow the pointer to the held type.
1410+
If `value` is behind an `interface{}` or pointer, set `indirect` to true to read the inner value. Most applications of
1411+
this function will want to do this.
14111412

14121413
### len
14131414

0 commit comments

Comments
 (0)