Documentation ¶
Index ¶
- Constants
- func CopyPath(frm, to string) error
- func Expanduser(path string) string
- func HashMd5(bs []byte) string
- func HashMd5String(s string) string
- func HashSha1(bs []byte) string
- func HashSha1String(s string) string
- func ParseISODatetime(s string) (time.Time, error)
- func ParseSQLiteDatetime(s string) (time.Time, error)
- func ReverseSlice[S ~[]E, E any](s S) []E
Constants ¶
View Source
const FormatDateOnly = "2006-01-02"
View Source
const SQLiteDateTime = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
func HashMd5String ¶
func HashSha1String ¶ added in v0.4.0
func ParseISODatetime ¶
A quick helper for parsing iso time because I find it hard to remember the const name
func ParseSQLiteDatetime ¶
Given a datetime string in the form "2022-01-14 06:41:48" parse it to time.Time
@note Rather than parse timestamps we can also pull timestamps out of the db. Here's an example for Chrome:
strftime("%s", visit_time / 1e6 + strftime ('%s', '1601-01-01'), 'unixepoch') AS `timestamp`,
Might be a better approach, but for now I like seeing the extracted time visually for debugging.
func ReverseSlice ¶
func ReverseSlice[S ~[]E, E any](s S) []E
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.