Skip to content

majidalaeinia/lintstructpadding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lint Struct Padding

Description

You can read this article to know more about performance improvement on golang structs.
This linter helps you find (and fix) the ordering issues of your golang structs fields.

Installation

go install github.com/majidalaeinia/lintstructpadding@latest
sudo mv $(go env GOPATH)/bin/lintstructpadding /usr/bin

Run the Linter

specific file

lintstructpadding /path/to/a/singlefile.go

complete source code

cd /path/to/your/source/code
lintstructpadding

Fix Struct Padding

specific file

lintstructpadding --fix /path/to/a/singlefile.go

complete source code

cd /path/to/your/source/code
lintstructpadding --fix

TODO

  • Add tests
  • Remove blank lines on struct fixing
  • Improve README file with a terminal GIF showing what it does
  • Improve installation

About

Lint Golang Struct Padding

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages