Skip to content

essentialkaos/goheft

Repository files navigation

GitHub Actions CI Status GoReportCard codebeat badge GitHub Actions CodeQL Status

Usage demoInstallationUsageBuild StatusContributingLicense


goheft is simple utility for listing sizes of all used static libraries compiled into golang binary.

Usage demo

demo

Installation

From source

To build the GoHeft from scratch, make sure you have a working Go 1.19+ workspace (instructions), then:

go install github.com/essentialkaos/goheft@latest

Prebuilt binaries

You can download prebuilt binaries for Linux and macOS from EK Apps Repository:

bash <(curl -fsSL https://apps.kaos.st/get) goheft

Command-line completion

You can generate completion for bash, zsh or fish shell.

Bash:

sudo goheft --completion=bash 1> /etc/bash_completion.d/goheft

ZSH:

sudo goheft --completion=zsh 1> /usr/share/zsh/site-functions/goheft

Fish:

sudo goheft --completion=fish 1> /usr/share/fish/vendor_completions.d/goheft.fish

Man documentation

You can generate man page for goheft using next command:

goheft --generate-man | sudo gzip > /usr/share/man/man1/goheft.1.gz

Usage

Usage: goheft {options} go-file

Options

  --tags, -t tag…        Build tags (mergeble)
  --external, -E         Shadow internal packages
  --pager, -P            Use pager for long output
  --min-size, -m size    Don't show with size less than defined
  --no-color, -nc        Disable colors in output
  --help, -h             Show this help message
  --version, -v          Show version

Examples

  goheft application.go
  Show size of each used library

  goheft application.go -m 750kb
  Show size of each used library which greater than 750kb

  goheft application.go -t release,slim
  Use tags when building and counting size

Build Status

Branch Status
master CI
develop CI

Contributing

Before contributing to this project please read our Contributing Guidelines.

License

Apache License, Version 2.0