package zbool
import "zgo.at/zstd/zbool"
Package zstring implements functions for booleans.
Index ¶
Types ¶
type Bool ¶
type Bool bool
Bool converts various types to a boolean.
It's always stored as an integer in the database (the only cross-platform way in SQL).
Supported types:
bool int* and float* 0 or 1 []byte and string "1", "true", "on", "0", "false", "off" nil defaults to false
func (Bool) Bool ¶
func (Bool) MarshalJSON ¶
MarshalJSON converts the data to JSON.
func (Bool) MarshalText ¶
MarshalText converts the data to a human readable representation.
func (*Bool) Scan ¶
Scan converts the data from the DB.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON converts the data from JSON.
func (*Bool) UnmarshalText ¶
UnmarshalText parses text in to the Go data structure.
func (Bool) Value ¶
Value converts a bool type into a number to persist it in the database.
Source Files ¶
zbool.go
- Version
- v0.0.0-20240930202209-a63c3335042a (latest)
- Published
- Sep 30, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 days ago –
Tools for package owners.