Documentation
¶
Index ¶
- Constants
- func Increase(s []byte) []byte
- func Reformat(data, origin []byte, w io.Writer, incrementSerial bool) error
- func SerialToHuman(s []byte) string
- func Split(buf []byte, lim int) [][]byte
- func StripOrigin(origin, name []byte) []byte
- func TimeToHuman(ttl *int) string
- func TimeToHumanByte(ttl []byte) []byte
Constants ¶
View Source
const ( Space3 = " " Indent = 29 )
View Source
const ( Second = 1 Minute = Second * 60 Hour = Minute * 60 Day = Hour * 24 Week = Day * 7 )
View Source
const Year15 = time.Duration(24*time.Hour*365) * 15
View Source
const Year5 = time.Duration(24*time.Hour*365) * 5
Variables ¶
This section is empty.
Functions ¶
func SerialToHuman ¶
SerialToHuman will detect if a number is epoch, or a coded date, ie:
1712989081 is epoch, because, when converted is less than 15 years ago, and not more than 5 years in the future.
If not epoch, we assume a "date" format: 2024041300. Every sequence number 00, 01, is assumed to be an hour.
Both are converted to a more human readable string.
func StripOrigin ¶
func TimeToHuman ¶
func TimeToHumanByte ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.