-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce number of dependencies #39
Comments
Ouch - just added this (very useful) repo in a project and it put 3MB on the binary (and that's with -ldflags s -w). Am just looking at how to slim it down. |
Looking like "github.com/ttacon/libphonenumber" is a large culprit. This commit below, moving the PhoneNumber methods out has made a ~40% binary size reduction: kgolding@2382148 |
How come that works? Every Message object should have PhoneNumber types
attached
…On Fri, May 24, 2019 at 4:02 PM Kevin Golding ***@***.***> wrote:
Looking lib "github.com/ttacon/libphonenumber" is a large culprit. This
commit below, moving the PhoneNumber methods out has made a ~40% binary
size reduction: ***@***.***
<kgolding@2382148>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39?email_source=notifications&email_token=AABZEI2333RVOLD6MGBFM2DPXBXZPA5CNFSM4HMSEP4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGXKGY#issuecomment-495809819>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABZEI5B4X2IGBKDR2ZZV7TPXBXZPANCNFSM4HMSEP4A>
.
--
Kevin Burke
phone: 925-271-7005 | kevin.burke.dev
|
It's only NewPhoneNumber(), and the .Friendly() and .Local() methods that use the libphonenumber dependency. PhoneNumber is just an alias of string. And these three only seem to be used in the tests :) |
I recently created a new project that used this project.
Bringing this library into the project results in the following modules being added to
go.mod
protobuf
support appears to come from libphonenumber, which seems reasonable.Any idea why this requires
mgo
?The text was updated successfully, but these errors were encountered: