An open API service indexing awesome lists of open source software.

https://github.com/barryz/gsorder

Reorders the fields of structure to optimize the amount of padding.
https://github.com/barryz/gsorder

memory-allocator struct

Last synced: 26 days ago
JSON representation

Reorders the fields of structure to optimize the amount of padding.

Awesome Lists containing this project

README

          

# gsorder

`gsorder` is a command line tool that used for reorders the fields of structure in Go(lang) to optimize(minimize) the amount of padding.

## Installation

```bash
$go get -u github.com/barryz/gsorder
```

## Usage

```bash
$gsorder -pkg $your_go_pkg
```

## Inspiration

- [go-tools](https://github.com/dominikh/go-tools/tree/master/cmd/structlayout)
- [maligned](https://github.com/mdempsky/maligned)