"I took the above code and put it in an easy to use library" ... [but] "I do not give anyone permissions to use this tool for any purpose. Don't use it."
Sounds strange, until you consider that he only added the "license" 2 years later. I wonder how many questions from various people wanting to use the tool for various purposes he received during this time?
That is a beautiful, if sort of minor, hack. "I need a license because I want to use this at work and they need me to have a license for all code we use." "Here's the license: 'No.'"
I can imagine the type people looking to actually use this. They are using go for whatever reason but complain about it constantly because they want it to be Ruby on Rails.
I’m all over using gomock to test my packages in isolation. I’ll just continue to do that with generated mocks instead of trying to monkeypatch a language that isn’t intended for that.
I’m curious about your motivation for writing this. Did it start out as something legitimate and morphed into a joke when you wanted to see how far you can push it? Or were you taking the piss the whole time?
> I do not give anyone permissions to use this tool for any purpose. Don't use it.
At least "any purpose" should say anything other than personal testing or something. This is silly otherwise. On the other hand at least he's transparent about it.
Suppose you want to unit test some function you've written that makes use of a library that doesn't implement interfaces. You can either write a wrapper interface for the library and inject this wrapper as your dependency, or you can just use the library as-is and hook the function calls in your tests using OP's library. The first method might be the "proper" way of doing things, but you end up with slightly more cluttered code purely to serve the needs of your unit tests. In the second case, any unsafe code is never going into production
It's sort of like asking "What's a good use of WriteMemoryProcess or CreateRemoteThread". It's not the kind of tool you acquire and then go find uses for, it's something you will resort to only when you have no other logical choice
Yea I was aware... I hesitated to suggest this could lead to AOP for Go because I'm not fond of AOP and it's magicalness at all (used to write a lot of Java)