1
0
mirror of https://github.com/fiatjaf/nak.git synced 2025-07-29 16:28:29 -04:00
Files
nak/nostrfs/helpers.go

20 lines
280 B
Go

package nostrfs
import "strconv"
func kindToExtension(kind int) string {
switch kind {
case 30023:
return "md"
case 30818:
return "adoc"
default:
return "txt"
}
}
func hexToUint64(hexStr string) uint64 {
v, _ := strconv.ParseUint(hexStr[16:32], 16, 64)
return v
}