Skip to content

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

Closed
@bradfitz

Description

@bradfitz
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions