user_agent icon indicating copy to clipboard operation
user_agent copied to clipboard

Package name should be useragent, not user_agent

Open peterbourgon opened this issue 3 years ago • 2 comments

By convention, packages are given lower case, single-word names; there should be no need for underscores . . .

https://golang.org/doc/effective_go.html#package-names

Good package names . . . are lower case, with no under_scores or mixedCaps.

https://blog.golang.org/package-names

peterbourgon avatar Dec 18 '20 17:12 peterbourgon

Thanks for reaching out. Yes, I know, that's something I realized some time after creating the package. However I don't want to break code from people by changing the name of the package...

mssola avatar Jan 05 '21 15:01 mssola

You're still on major version 0, it shouldn't be a problem.

peterbourgon avatar Jan 05 '21 17:01 peterbourgon

@mssola I'm considering using your library in one of my projects, but I'd really like you to rename the package please if you're okay with this. Breaking the ~200 something imports 😳 won't be a big deal if you fork the codebase into a v2 package or something similar which I've seen other projects do.

Can we do that? 🤔

prologic avatar Oct 28 '22 07:10 prologic

Done. See: https://github.com/mssola/useragent

mssola avatar Feb 17 '23 15:02 mssola