lang Package lang provides useful generic one-liners to work with variables, slices and maps go get -u github.com/maxbolgarin/lang Add to your Go program a spice of functional languages: docs. You also should try this package: lo.