File tree 4 files changed +2888
-1
lines changed
4 files changed +2888
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Size of the compiled binary by Go package
2
+
3
+ ![ Binary sizes] ( binsize.png )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ current_dir := $(dir $(mkfile_path))
11
11
# Global stuff.
12
12
13
13
GO =$(shell which go)
14
- HOMEBREW_PACKAGES =bash bats-core coreutils findutils git git-lfs go jq nodejs pre-commit python@3.11 tfschema trufflesecurity/trufflehog/trufflehog
14
+ HOMEBREW_PACKAGES =bash bats-core coreutils findutils git git-lfs go jq librsvg nodejs pre-commit python@3.11 tfschema trufflesecurity/trufflehog/trufflehog
15
15
16
16
# Determine the operating system and CPU arch.
17
17
OS =$(shell uname -o | tr '[:upper:]' '[:lower:]')
@@ -61,6 +61,7 @@ install-tools-go:
61
61
$(GO ) install github.com/bitfield/gotestdox/cmd/gotestdox@latest
62
62
$(GO ) install github.com/google/osv-scanner/cmd/osv-scanner@v1
63
63
$(GO ) install github.com/goph/licensei/cmd/licensei@latest
64
+ $(GO ) install github.com/nikolaydubina/go-binsize-treemap@latest
64
65
$(GO ) install github.com/orlangure/gocovsh@latest
65
66
$(GO ) install github.com/pelletier/go-toml/v2/cmd/tomljson@latest
66
67
$(GO ) install github.com/securego/gosec/v2/cmd/gosec@latest
@@ -196,6 +197,14 @@ docs-serve:
196
197
open http://localhost:6060/pkg/github.com/northwood-labs/terraform-provider-corefunc/corefunc/
197
198
godoc -index -links
198
199
200
+ .PHONY : binsize
201
+ # # binsize: [docs] Analyze the size of the binary by Go package.
202
+ binsize :
203
+ @ $(ECHO ) " "
204
+ @ $(ECHO ) " \033[1;33m=====> Displaying Go HTTP documentation...\033[0m"
205
+ $(GO ) tool nm -size " $( GOBIN) /$( BINARY_NAME) " | go-binsize-treemap > binsize.svg
206
+ rsvg-convert --width=2000 --format=png --output=" binsize.png" " binsize.svg"
207
+
199
208
# -------------------------------------------------------------------------------
200
209
# Linting
201
210
You can’t perform that action at this time.
0 commit comments