Structs with an Identifier

Can anyone show me an example of a struct with an identifier?

The structs name and it’s fields names are identifiers, so you can pick any struct as an example, or I do get your question totally wrong and you need to elaborate.

So in this, https://play.golang.org/p/lRNOwytyagS

what is the name of the struct, and what are its field names?

Sorry I have to ask, but have you done the tour already? You are in this forum quite a while now and still most of your questions are as if you were on the very first day of learning programming at all.

By all we have gone through so far, you should be able answer this questions yourself.

If you consider this answer a bit harsh, please tell me. I’d like to make my social interaction better.

You are a little harsh but don’t worry about it. It may be a personality trait, and I have a feeling that me dealing with that type of personality will make me a stronger individual. As for the tour , I believe I have done it. It is possible that I have not completed it. I get a little lost sometimes with what seems like a flood of information, (But it is a welcome flood!)

Where would I find it :blush:

You can find it at https://tour.golang.org/welcome/1, sorry for missing the link in the first response.

And after I had some minutes of recreation, in the following snippet, s is the name of the struct-type, f1 is the name of a field and even int is an identifier (the name of a type).

type s struct {
  f1 int
}

Thank you. I saved all that to two files.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.