Open bep opened 6 years ago
A PR to remove that dep would be fantastic and welcome.
I assume you want to keep the Package
method? What is its value?
We would. It’s used in a lot of places to take a path name and turn it into a package name. So /Users/markbates/go/src/foo/bar would become foo/bar or C:\WindowsPath\go\src\etc…
inflect.Name is used very heavily as part of all the Buffalo stuff.
We would. It’s used in a lot of places to take a path name and turn it into a package name. So /Users/markbates/go/src/foo/bar would become foo/bar or C:\WindowsPath\go\src\etc…
inflect.Name is used very heavily as part of all the Buffalo stuff.
Mark Bates
On Feb 17, 2018, 9:24 AM +0000, Bjørn Erik Pedersen notifications@github.com, wrote:
I assume you want to keep the Package method? What is its value? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Why not move it to the Buffalo project where it’s used?
It was but it’s been moved here because it’s being used in a lot of projects not just buffalo so it was moved here so there wasn’t a dependency on buffalo everywhere else. The Name type fits here as it provides a way to make uniformed inflections against a name it definitely belongs here, but I agree if the envy dep can be dropped it should.
You're stretching the inflect term into a very specific domain here, but this is your project.
One last suggestion from me:
Create package(s), so one can do:
import "github.com/markbates/inflect/name"
name := name.Inflect("some string")
Etc. With the added benefit of a common interface.
The only envy usage I can see there is envy.GoPaths()
. It shouldn't be difficult to remove this dep.
Made a PR: https://github.com/markbates/inflect/pull/15
See https://github.com/markbates/inflect/blob/master/name.go#L8
I did a
dep ensure -update
in Hugo and got some unknown and new packages. I tracked it to the above. That does not look like core inflect functionality. I would appreciate if you could remove/find another way to handle the above.I will now pin Hugo against an older version of Inflect, but it would be a pity if we miss out on future bug fixes etc.