Screenshots • Installation • Command-line completion • Man documentation • FAQ • Usage • Build Status • Contributing • Thanks • License
aligo is a utility for checking and viewing Golang struct alignment info.
To build the aligo from scratch, make sure you have a working Go 1.17+ workspace (instructions), then:
go install github.com/essentialkaos/aligo
You can download prebuilt binaries for Linux and macOS from EK Apps Repository:
bash <(curl -fsSL https://apps.kaos.st/get) aligoYou can generate completion for bash, zsh or fish shell.
Bash:
sudo aligo --completion=bash 1> /etc/bash_completion.d/aligoZSH:
sudo aligo --completion=zsh 1> /usr/share/zsh/site-functions/aligoFish:
sudo aligo --completion=fish 1> /usr/share/fish/vendor_completions.d/aligo.fishYou can generate man page for aligo using next command:
aligo --generate-man | sudo gzip > /usr/share/man/man1/aligo.1.gzQ: I think my struct is well aligned. How can I disable check for it?
A: You could add a comment with text aligo:ignore for this struct, and aligo will ignore all problems with it. Example:
// This is my supa-dupa struct
// aligo:ignore
type MyStruct struct {
A bool
B int
}Usage: aligo {options} {command} package…
Commands
check Check package for alignment problems
view Print alignment info for all structs
Options
--arch, -a name Architecture name
--struct, -s name Print info only about struct with given name
--no-color, -nc Disable colors in output
--help, -h Show this help message
--version, -v Show version
Examples
aligo view .
Show info about all structs in current package
aligo check .
Check current package for alignment problems
aligo -s PostMessageParameters view .
Show info about PostMessageParameters struct
| Branch | Status |
|---|---|
master |
|
develop |
Before contributing to this project please read our Contributing Guidelines.
We would like to thank:

