You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You introduce the idea of type assertion with examples of interfaces and structures.
these are complicated syntactical examples that are difficult to understand in the realm of the basic language. Dot notation with some shit in-between parens:
y.(map[string]interface{})
value.(type)
the reader has not been introduced to the concepts of interfaces or structs yet so it cannot be understood in this sequence.
Consider moving this section to advanced concepts and perhaps referencing this:
ex 3.3 Type assertion
"for more advanced subject of type conversion, please see section 2001.1" etc
EDIT: I think the whole document could use a good edit so that the examples and subjects flow with what is learned. Throughout the book, examples are presented using concepts and techniques that have not yet been introduced and explained, therefore it frustrates.
The text was updated successfully, but these errors were encountered:
I should mentioned positive points to you though. I like how you introduce "hints" on what to avoid or take advantage of, such as named params. Another example of something interesting thing I learned today was [...]string{ } when loading string vars. and another, how structs and interffaces really work. I never saw this before. I also like how you cross reference the doc to external documentation from other sites.
All in all this is a great continuation over the basic documentation tour with golang. We really need something like this so we can dig down into the langauge and come up with easy to understand best practice of patterned use. Thanks!
I just came here to raise the same issue. I just reached the Type assertion section and have been scratching my head for half an hour at what interfaces are and especially what an empty interface is.
You introduce the idea of type assertion with examples of interfaces and structures.
y.(map[string]interface{})
value.(type)
Consider moving this section to advanced concepts and perhaps referencing this:
ex 3.3 Type assertion
"for more advanced subject of type conversion, please see section 2001.1" etc
EDIT: I think the whole document could use a good edit so that the examples and subjects flow with what is learned. Throughout the book, examples are presented using concepts and techniques that have not yet been introduced and explained, therefore it frustrates.
The text was updated successfully, but these errors were encountered: