Hi Quentin, here’s a code review.
Since type ability is not exported, why not embed sync.Mutex? What does o
stand for?
I’d say that comments like “// newAbility creates a new ability” are
unnecessary. The identifiers are documentation. There are many unnecessary
comments.
For read-only methods like *ability.isOn() perhaps a sync.RWMutex may make
sense.
type brain could have sync.Mutex and *astiws.Client embedded. type brains,
type dispatcher, type interfaces could have sync.Mutex embedded. type
server could have everything besides name embedded. type brainsServer could
have everything embedded. type clientsServer could have everything besides
stopFunc embedded. The sub-packages have more cases like this.
There are no tests.
The horizontal dependency of go-astibob/abilities to go-astibob/brain is a
red flag for me. Why not define the abilities in package astibob?
To me the demo examples show a clean interface for interacting with the
library.
I don’t understand the pkg directory, why not have these as regular
sub-packages?
In go-astibob/pkg/portaudio, robotgo, I’m not sure what an alternative
would be, but defining methods on a struct{} type seems unnecessary
compared to just having functions. Elsewhere I’ve suggested defining a
struct type with function fields instead. If this is to satisfy an
interface, perhaps there is another approach where the interface is
unnecessary.
These are the most complex html templates I’ve seen, I may refer back to
these sometime.
The godoc is a reasonable size but there are a lot of types without any
functionality. The README.md seems long, perhaps examples/demo could
contain some of that information.
Matt
On Monday, January 29, 2018 at 2:13:24 AM UTC-6, Asticode wrote:
>
> Heys guys,
>
> I'm happy to announce Bob, a framework to create a distributed AI that can
> learn to understand your voice, speak back, interact with your mouse and
> keyboard, and anything else you want:
> https://github.com/asticode/go-astibob.
>
> Let me know what you think.
>
> Cheers
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.