re: Language Features: Best and Worst VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

This is basically just metadata that you can attach to a variable, right?

related: stackoverflow.com/questions/108587...

 

That's the gist of it yes. I think you could implement the same thing with tagged template literals in JS, but Go just offers it natively. 🤓

In js you would use decorators, which are native langage features:

class Invitation {
  @Serialize({ json: 'invitationToken', db: 'invitation_token' })
  token
}
code of conduct - report abuse