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

grow /exp/zapfield #1364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikhalytch
Copy link

adds following generic Field constructors:

  • Uint
  • Uint64
  • Uint32
  • Uint16
  • Uint8
  • Int
  • Int64
  • Int32
  • Int16
  • Int8
  • Float64
  • Float32
  • String
  • Strings

@CLAassistant
Copy link

CLAassistant commented Sep 26, 2023

CLA assistant check
All committers have signed the CLA.

@mikhalytch mikhalytch marked this pull request as ready for review September 26, 2023 21:40
@mikhalytch mikhalytch mentioned this pull request Sep 26, 2023
Copy link
Collaborator

@abhinav abhinav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @mikhalytch, thanks for this PR, and apologies for the delay.

I'd like to better understand the motivation behind this proposal.
What problem are we trying to solve with these type-parameterized field constructors?
Is this another version of the problem from #1275?

@abhinav
Copy link
Collaborator

abhinav commented Oct 6, 2023

Separately, note that while func Str and func Strs had the possibility of being moved to the top-level Zap package, func String, func Strings, and these functions do not (because of the conflict). That's not the end of the world, but it means that if we ever consider these APIs for promotion to the main Zap module, they'll still have to be under a zapfield subpackage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants