Compare commits

..

No commits in common. "fb8825249a33abf064c62461caced526042916d0" and "7394c1b49ecfed7983d31a2427d01505427ee58b" have entirely different histories.

3 changed files with 4 additions and 10 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
data/
shortify/
./shortify/

View File

@ -1,10 +1,7 @@
package main
import (
"fmt"
"git.tijl.dev/tijl/shortify"
"git.tijl.dev/tijl/shortify/pkg/generation"
"github.com/gofiber/fiber/v2"
)
@ -16,9 +13,6 @@ func main() {
panic(err)
}
// example decoding
fmt.Println(generation.DecodeBase62("11uPoqA1W"))
// listen the admin interface
unixListener, err := shortify.GetUnixListener("./shortify/admin.sock")

View File

@ -7,10 +7,10 @@ import (
)
const (
idSize = 6 // 4 bytes for random part
idSize = 4 // 4 bytes for random part
prefixSize = 2 // 2 bytes for client prefix
rawIDLength = prefixSize + idSize // total 6 bytes
//base62Len = 8 // 6 bytes encoded in base62 ~ 8 chars
base62Len = 8 // 6 bytes encoded in base62 ~ 8 chars
poolSize = 10000
)