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

struct tags can't be built from string constants #4740

Closed
bradfitz opened this issue Feb 1, 2013 · 1 comment
Closed

struct tags can't be built from string constants #4740

bradfitz opened this issue Feb 1, 2013 · 1 comment
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Feb 1, 2013

This is a little unfortunate:

    http://play.golang.org/p/AaMZm0pI6g

I'd like to be able to do:

  type schemaBlob struct {
    ClaimDate string `json:"`   fieldClaimDate   `"`
  }

If we ever permit tags on things other than struct fields, I'd like to keep this in mind.
@rsc
Copy link
Contributor

rsc commented Feb 2, 2013

Comment 1:

I believe we discussed this when we added tags and explicitly decided to keep them
simple literals, the same way that import paths are.

Status changed to WorkingAsIntended.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants