func Id() string {
	mu.Lock()
	defer mu.Unlock()
	now := time.Now().UTC().UnixNano()
	var r int64
	if now == lastTime {
		lastRand++
	} else {
		lastRand = rand.Int63()
	}
	r = lastRand
	lastTime = now
	return toStr(now) + "-" + toStr(r)
}
Id returns a 23 char string based on timestamp and a random number. The format is "XXXXXXXXXXX-YYYYYYYYYYY" where X
is the timestamp and Y is the random number. If (by any chance) this is called in the same nanosecond, the random
number is incremented instead of a new one being generated. This makes sure that two consecutive Ids generated in
the same goroutine also ensure those Ids are also sortable.

It is safe to call from different goroutines since it has it's own locking.
package sid
import (
	"math/rand"
	"strings"
	"sync"
	"time"
)
var lastTime int64
var lastRand int64
var chars = make([]string, 11, 11)
var mu = &sync.Mutex{}
const base64 string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
func toStr(now int64) string {
	for i := 10; i >= 0; i-- {
		index := now % 64
		chars[i] = string(base64[index])
		now = now / 64
	}
	return strings.Join(chars, "")
}