Skip to content

Provide a lightweight fmt #442

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

Closed
bep opened this issue Apr 22, 2016 · 2 comments
Closed

Provide a lightweight fmt #442

bep opened this issue Apr 22, 2016 · 2 comments

Comments

@bep
Copy link

bep commented Apr 22, 2016

This may be related to #186 ...

I have this fairly smallish app, and I by pure habit imported fmt to do:

panic(fmt.Sprintf("Error: %s", err) 

Etc.

But realize that my build goes from 80kb to 600kb.

And that isn't worth it just to simplify string building. Not sure what's inside fmt that makes it so bulky (Unicode tables?) ... But it would be nice to have something similar, but lighter.

@dmitshur
Copy link
Member

Depending on how you're planning to use GopherJS, it may be very hard, if not unavoidable to not import fmt and some other very common standard library packages. Unless you write all your code by hand and avoid any dependencies that may import those packages.

#186 may indeed be the better general solution.

@bep
Copy link
Author

bep commented Apr 23, 2016

it may be very hard, if not unavoidable to not import fmt and some other very common standard library packages.

You are right. I have slept on it, closing.

@bep bep closed this as completed Apr 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants