Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpl: Add reflect namespace #4167

Closed
wants to merge 2 commits into from
Closed

Conversation

moorereason
Copy link
Contributor

Adds KindIs, KindOf, TypeIs, TypeIsLike, and TypeOf funcs in a reflect
namespace.

Fixes #4081

@kaushalmodi
Copy link
Contributor

Thank you! Can you please also add the docs for these functions?

Adds KindIs, KindOf, TypeIs, TypeIsLike, and TypeOf funcs in a reflect
namespace.

Fixes gohugoio#4081
@bep
Copy link
Member

bep commented Dec 16, 2017

Hold on with the docs until we decide on the API.

@bep
Copy link
Member

bep commented Dec 16, 2017

As I said in the other PR, we need to be restrictive about adding new template funcs until we fix the docs setup for it.

But we cannot build an API where the user has to set up conditionals with this hefty list:

* array
 * bool
 * chan
 * complex128
 * complex64
 * float32
 * float64
 * func
 * int
 * int16
 * int32
 * int64
 * int8
 * interface
 * invalid
 * map
 * ptr
 * slice
 * string
 * struct
 * uint
 * uint16
 * uint32
 * uint64
 * uint8
 * uintptr
 * unsafePointer

We need to discuss a simpler API. But that will have to wait.

@bep
Copy link
Member

bep commented Jan 7, 2018

@moorereason please create a reflect proposal issue so we can agree on the design.

@bep bep closed this Jan 7, 2018
@moorereason moorereason deleted the reflect branch December 17, 2020 18:20
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add reflection-related template functions
3 participants