[go-nuts] How to return concrete implementation to satisfy interface

2022-06-17 Thread Deividas Petraitis
Today while working on my side project I have encountered interesting issue and despite I was able to overcome it I have realised that I might be missing some import concepts about Go. Let me share example code to demostrate the issue I am referring to: ```go package main import ( "net/http

[go-nuts] Re: Functions vs Methods: explain reasoning behind STD

2022-06-02 Thread Deividas Petraitis
I am really happy with thoughts and points shared so far, thank you all! Unfortunately I am not able to edit original my post, so to make sure I got all of these points I will just sum up everything below, I think this summary may be valuable for any less experienced gopher, please correct me

[go-nuts] Functions vs Methods: explain reasoning behind STD

2022-06-02 Thread Deividas Petraitis
Background: when I am writing code mostly I end up with some clunky solutions I am not happy with and one of the reasons I think is that I might be mixing funcs vs methods. So the question is basically the title. I have searched both in this group ( without a luck ) and in the Internet for po