justforfunc #11: code review of an IRC package's API

preview_player
Показать описание
Let's review and improve the API of a IRC client!

We want the API to be easier to use, but even more important, harder to misuse.

More references on Functional Options:
Рекомендации по теме
Комментарии
Автор

These code review videos are a great way to learn how to apply the language. Keep em coming!

michaeldasilva
Автор

I found the 2 suggested videos really helpful. Please keep doing that!

dearozero
Автор

Can't believe those responses from a month ago. I really enjoy your videos, especially these code review ones. Keep up the good work.

Dj
Автор

Fantastic video as usual. You are an excellent teacher. I’ve learned a _lot_ from this one. Thank you for taking the time to produce such high quality content.

fixpoint
Автор

Awesome show as always! ❤️

An idea I'd like to see for an upcoming show is a deep dive on testing. You've touched on testing in past episodes but it's always been at a rather high level and focused on unit tests. Things like system testing, tests driven from data files, how best to organize your files, and other interesting packages to help with testing would be great.

daveteare
Автор

+JustForFunc PLEASE do an episode on flag management. I currently have a flags/flags.go package with NewFlags fn that returns a struct of flags parsed and then the caller (main.go in my case) can then dereference the struct keys to get at the flags values. I'm interested to know how others are doing things.

markmcdonnell
Автор

your videos are awesome man! unfortunetly my knowledge in golang is very basic and I dont understand everything, however I enjoy waching you coding 👍

GustavoDiaz
Автор

It would really help, if you would commit your changes in logical steps. So afterwards you could review the steps taken commit by commit, showing the individual diffs. Just to reiterate.

Also: what's up with this strange plant? XD

EDIT: Excellent video as always. Keep it up :)

bestformspielt
Автор

Francesc, what extensions are you using in VS Code, aside from the Go extension?

guild_navigator
Автор

I just realized that passing a read writer instead of server and port would easily allow for the use of an SSL encrypted connection by just passing it to the new function.

juliankandlhofer
Автор

As always, nice and informative. Thank you!
Rather than exposing channel from Messages(), one could do a blocking read from the channel inside the method, and return a message object and an error. So the user will do `for { msg, err := c.ReadMessage() }`. This kind of API feels more natural to my taste. What do you think?

neknarqo
Автор

Know what IRC is. Have only vaguely heard of Slack.

HowardCShawIII
Автор


Thanks for the episode, nice review and as usual, you always learn something !

sebastienfriess
Автор

Thank you! Could you show which patter is good for the case if we want to make a dynamically composed object? For example if we want to add or remove a behavior at runtime?

shadowfaxenator
Автор

"use of close network connection"

Yes, that feels wrong.
Which is why I guess a lot of people hope this will be resolved:

pm
Автор

hi can you please upload this in 4 times speed so i can put it in 2 times speed you are too slow for me

dreamforgestudios