Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…
Show HN: I wrote a book about Go
111–120 of 160 posts
Re: Show HN: I wrote a book about Go
#112Re: Show HN: I wrote a book about Go
#113Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…
Re: Show HN: I wrote a book about Go
#114Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…
Not a Go programmer and usually don't post here. Just wanted to appreciate the effort, also saving it for future reference. Thanks
Re: Show HN: I wrote a book about Go
#115Hello all, After 2.5 years of writing, countless weekends and evenings, I released a book about the Go programming language. The book is available for free on the website because I wanted to give something back to the developer's community :) It is composed of 700+ pages, 41 chapters, and approximately 405 drawings/screenshots. I tried to cover all the important topics that a new Go programmer should know. At the end…
A very minor point (sorry): please could you search-and-replace all “advices” to “advice” in the text? Advice is its own plural form.
Re: Show HN: I wrote a book about Go
#116Earlier quoted context omitted.
Can you help me understand this code on interfaces? If you were calling (CartStore.GetById()) where does (*cart.Cart) come from? I don't see any logical connection between these two. type Cart interface { GetById(ID string) (*cart.Cart, error) Put(cart *cart.Cart) (*cart.Cart, error) } // A type that implements the interface : type CartStore struct{} func (c *CartStore) GetById(ID string) (*cart.Cart, error) { // imp…
Hello rustyboy, first thanks for your feedback. I think that there is a mistake in the name of the interface type. It should not be `Cart` but something else. Like `CartStorage`. A type that implement this CartStorage interface can be named `MySQLCartStorage` or `DynamoDBCartStorage`. Each database engine responsible for the storage will have a different implementation. The interface is here to define a contract, a s…
What I don't understand is the return types of these functions, a pointer to a cart's cart member? or an error.
Re: Show HN: I wrote a book about Go
#117Earlier quoted context omitted.
Thanks for your kind feedback _l4jh. You are not the only one to request a preview ! I will add it when I have some time. I will include maybe the Table of Contents and a couple of chapters.
Sounds great to me! Can't go wrong with a nice looking preview ;) Also I forgot to say I really appreciate you giving this away for free online. It is clear you put a tremendous amount of time and effort into making this.
Re: Show HN: I wrote a book about Go
#118Earlier quoted context omitted.
Hello rustyboy, first thanks for your feedback. I think that there is a mistake in the name of the interface type. It should not be `Cart` but something else. Like `CartStorage`. A type that implement this CartStorage interface can be named `MySQLCartStorage` or `DynamoDBCartStorage`. Each database engine responsible for the storage will have a different implementation. The interface is here to define a contract, a s…
Let me just clarify, sorry i'm from python, so not very familiar but this feels like a "circular reference". You're implementing a struct CartStore which has methods GetById, and Put. Because interfaces (or contracts) are implicit then it's automatically considered a Cart. What I don't understand is the return types of these functions, a pointer to a cart's cart member? or an error.
I will update the example because it's confusing !
If you have some time come to the speak with me in the chatbox on the website I can help you understand this.
Re: Show HN: I wrote a book about Go
#119Earlier quoted context omitted.
Hello rustyboy, first thanks for your feedback. I think that there is a mistake in the name of the interface type. It should not be `Cart` but something else. Like `CartStorage`. A type that implement this CartStorage interface can be named `MySQLCartStorage` or `DynamoDBCartStorage`. Each database engine responsible for the storage will have a different implementation. The interface is here to define a contract, a s…
Let me just clarify, sorry i'm from python, so not very familiar but this feels like a "circular reference". You're implementing a struct CartStore which has methods GetById, and Put. Because interfaces (or contracts) are implicit then it's automatically considered a Cart. What I don't understand is the return types of these functions, a pointer to a cart's cart member? or an error.
cart.Cart
package.NameInPackage
So the name Cart is an interface, the function/method signatures are indicating that a Cart is being returned but being explicit about the package the interface belongs to with cart.Cart. It's made more confusing since the name cart (lower-c) is being used for both a member variable and the package name in the signature of Put, and it looks like the package name doesn't show up on an explicit line in that chapter to help clarify it.