1
0
Fork 0
Personal collection of Go packages that I wish were in the standard library
Go to file
Gregory Eremin 3403a1c118
Add do-not-edit banner to generated files
2018-06-23 23:50:01 +02:00
filecache Add examples to readme 2018-06-17 13:56:44 +02:00
set Add do-not-edit banner to generated files 2018-06-23 23:50:01 +02:00
sqldb Add sqldb and set packages 2018-06-23 23:46:35 +02:00
threadpool Add thread pool implementation 2018-06-17 12:57:47 +02:00
LICENSE Add thread pool implementation 2018-06-17 12:57:47 +02:00
Makefile Add sqldb and set packages 2018-06-23 23:46:35 +02:00
README.md Add examples to readme 2018-06-17 13:56:44 +02:00

README.md

Gobelt

Gobelt is a collection of Go tools.

Thread pool

import "github.com/localhots/gobelt/threadpool"
ctx := context.Background()
pool := threadpool.New(5)
pool.Enqueue(ctx, func() {
    fmt.Println("Hello")
})
pool.Close()

File cache

import "github.com/localhots/gobelt/filecache"
var val int
filecache.Load(&val, "path/to/cachefile", func() interface{} {
    // Expensive calls here
    return 100
})