https://github.com/jackc/box
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jackc/box
- Owner: jackc
- License: mit
- Created: 2014-01-19T03:32:53.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-21T13:33:36.000Z (almost 12 years ago)
- Last Synced: 2025-03-21T10:10:04.464Z (about 1 year ago)
- Language: Go
- Size: 234 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
box
===
Use a box around values that can be undefined, unknown, empty, or present.
As Go does not have generics or templates, a box.go.erb is processed to produce box.go with specialized box types for each underlying type. Currently, boxes are defined for bool, float32, float64, int8, int16, int32, int64, string, time.Time, uint8, uint16, uint32, and uint64 types.
If you need additional types, you may want to fork this project into a sub-package and customize the type list in box.go.erb.