Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jondot/goweight
A tool to analyze and troubleshoot a Go binary size.
https://github.com/jondot/goweight
Last synced: 5 days ago
JSON representation
A tool to analyze and troubleshoot a Go binary size.
- Host: GitHub
- URL: https://github.com/jondot/goweight
- Owner: jondot
- License: mit
- Created: 2018-09-21T13:51:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-10T22:16:07.000Z (7 months ago)
- Last Synced: 2024-08-02T18:39:46.603Z (3 months ago)
- Language: Go
- Homepage:
- Size: 85.9 KB
- Stars: 1,686
- Watchers: 17
- Forks: 49
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
![](media/cover.png)
# goweight
A tool to analyze and troubleshoot a Go binary size.
For more, see [this blog post](https://medium.com/@jondot/a-story-of-a-fat-go-binary-20edc6549b97#.bzaq4nol0)
✅ Get a breakdown of all modules inside a binary
✅ Supports Go 1.11 modules
✅ Output as JSON for tracking and/or monitoring as part of CI## Quick Start
### With Go Modules - Go 1.11 or higher
```
$ go get github.com/jondot/goweight
$ cd current-project
$ goweight
```### Without Go Modules - Before Go 1.11
```
$ git clone https://github.com/jondot/goweight
$ cd goweight
$ go install$ cd current-project
$ goweight
```As an example, here's what `goweight` has to say about itself:
```
$ ./goweight
3.0 MB runtime
1.6 MB net
1.4 MB reflect
1.3 MB gopkg.in/alecthomas/kingpin.v2
870 kB math/big
668 kB github.com/alecthomas/template
628 kB syscall
626 kB text/template
550 kB go/ast
546 kB encoding/json
509 kB text/template/parse
495 kB github.com/alecthomas/template/parse
424 kB time
402 kB regexp/syntax
395 kB golang_org/x/net/dns/dnsmessage
388 kB fmt
```### Thanks:
To all [Contributors](https://github.com/jondot/goweight/graphs/contributors) - you make this happen, thanks!
# Copyright
Copyright (c) 2018 [@jondot](http://twitter.com/jondot). See [LICENSE](LICENSE.txt) for further details.