Some decisions I made along the way: * My package mainly exports an interface
RobotsExclusionProtocol but returns the implementation and it’s methods as a value instead of a pointer. My understanding of when to use pointers vs. values is that you should use pointers if your going to mutate the struct during the method or if the struct is very large and would be costly to copy all over the place. * 2 of the main ways of creating an implementation of the
NewFromURL (which does an HTTP request) functions, both of which take a channel so that you could use them with goroutines. The other method of creating an implementation is just a
New function that does not use channels. I decided to use channels for
NewFromURL because from my experience with NodeJS, reading a file and doing an HTTP request are asynchronous operations, so I figured they should be here as well.