preslavrachev / preslav.me-comments

0 stars 0 forks source link

2023/02/22/partially-implemented-interfaces-in-golang/ #17

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Partially-Implemented Interfaces in Go · Preslav Rachev

I am a software engineer with a decade-long experience developing software using Java, Go, and Elixir.

https://preslav.me/2023/02/22/partially-implemented-interfaces-in-golang/

abhimanyu003 commented 1 year ago

Excellent work a very well written article to describe this topic. This is going to be very useful for tests.

nchengyeeshen commented 1 year ago

Noticed a small error in the first code snippet. It's missing the interface keyword.

type doer interface {
    func Do()
}
preslavrachev commented 1 year ago

@nchengyeeshen thank you for pointing that out! I just pushed a small fix. Let me know if you notice some other typos.

jcorrea-videoamp commented 1 year ago

type doer interface { func Do() } func is not needed. Might be misleading for people beginning in Go

preslavrachev commented 1 year ago

@jcorrea-videoamp - another great catch! Just fixed it. Thanks 🙏