On Sunday, January 7, 2024 at 9:39:31 PM UTC-5 Corin Lawson wrote: *also thoughts on the mock lib (apologies for the lack of naming creativity),*
On Monday, January 8, 2024 at 9:00:24 AM UTC-5 TheDiveO wrote: *As for the naming: kudos for naming it what it is, clear and concise* A different perspective: Given the nature of Go package names and imports, I find it regrettable when people Go packages have generic names that have a high likelihood of conflicting with other package names. When it's for your own use, especially internal and not on a team, it's typically less problem. However, when the intent is to publish and encourage others to use I would respectfully advocate for a name that is not likely to be duplicated by someone else who is lacking in naming creativity <https://github.com/maraino/go-mock>. Certainly, when there are conflicts in names people can use aliases for their imports, as aliases were intended. When programming one's own side project app, using aliases typically doesn't become a big problem. However, when working on a Go codebase with tens or hundreds of developer those same-named packages quickly become a nightmare of differently named aliases making it really hard to tell what-is-what when looking at code in a complex codebase. IOW, which "util" is being used when "util2.DoStuff()" is called? And believe me, I have seen a *ton* of this kind of aliasing in production code. My comments apply even more <https://github.com/golang/mock/tree/main/mockgen> to CLI tools <https://github.com/derision-test/go-mockgen/blob/main/cmd/go-mockgen/main.go> like 'mockgen' in this case <https://github.com/MyNihongo/mockgen> because, while aliases are available on a CLI, it can cause problems for initial and ongoing setup for the tool. On Monday, January 8, 2024 at 9:00:24 AM UTC-5 TheDiveO wrote: *imagination be reserved to where it applies, not just here.* It doesn't have to be imaginative nor obfuscated to be cognizant of naming conflicts. Rather than "go-mock" it would be better IMO if the OP had named it *(something like) **"*go-vermock" *(the company he works for is Versant) *and if he chose to name his CLI "vermockgen," or similar. -Mike #jmtcw #fwiw -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/83b6fb46-41e5-45dd-afe6-f66a4c315d3fn%40googlegroups.com.