Skip to content

Gotiti: Golang POC for micro-benchmark performance source rewrite

License

Notifications You must be signed in to change notification settings

catenacyber/gotiti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

perfsprint

CI Go Report Card

Golang linter for performance, aiming at usages of fmt.Sprintf which have faster alternatives.

Installation

go get github.com/catenacyber/perfsprint@latest

Usage

perfsprint --fix ./...

Replacements

fmt.Sprintf("%s", strVal)  ->  strVal
fmt.Sprintf("%t", boolVal) ->  strconv.FormatBool(boolBal)
fmt.Sprintf("%x", hash)    ->  hex.EncodeToString(hash)
fmt.Sprintf("%d", id)      ->  strconv.Itoa(id)
fmt.Sprintf("%v", version) ->  strconv.FormatUint(uint64(version), 10)

More in tests.

About

Gotiti: Golang POC for micro-benchmark performance source rewrite

Resources

License

Stars

Watchers

Forks

Packages

No packages published