impack

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2021 License: Unlicense Imports: 13 Imported by: 0

README

Impack

Imperfect memory packer for Go

Features

impack will grab every struct in a package and order the fields by lower size to higher size. When sizes match it will order alphabetically.

This is an imperfect memory packer since it does not maximize memory efficiency by packing structs perfectly, it attempts to minimize memory footprint but trying to remain as human readable as possible.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Linter

type Linter struct {
	// contains filtered or unexported fields
}

Linter performs a simple memory packing on go a package

func NewLinter

func NewLinter(compiler, arch string) *Linter

NewLinter creates a new ImpackLinter by setting up the sizes and alignments

func (*Linter) Lint

func (linter *Linter) Lint(ctx context.Context, projectRoot string) error

Lint finds all structs in a package and lints them

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL