func (b *boltStorage) FindTask(ID string) (*types.Task, error) {
	t := &types.Task{}
	return t, b.db.View(func(tx *bolt.Tx) error {
		b := getTBucket(tx)
		bs := b.Get([]byte(ID))
		if bs == nil {
			return storage.ErrTaskNotFound
		}
		t.Unmarshal(bs)
		return nil
	})
}
FindTask in boltDB
package bolt
import (
	"encoding/json"
	"fmt"
	"sort"
	"strconv"
	"github.com/boltdb/bolt"
	"github.com/wrfly/et/storage"
	"github.com/wrfly/et/types"
)
type boltStorage struct {
	db *bolt.DB
}
func (b *boltStorage) SaveTask(t *types.Task) error {
	return b.db.Update(func(tx *bolt.Tx) error {
		b := getTBucket(tx)
		if err := b.Put(t.Key(), t.Value()); err != nil {
			return err
		}
		statusB := getSBucket(tx)
		bs := statusB.Get(keyTaskSubmit)
		num, _ := strconv.ParseUint(string(bs), 10, 64)
		if err := statusB.Put(keyTaskSubmit,
			[]byte(fmt.Sprint(num+1))); err != nil {
			return err
		}
		bs = statusB.Get(keyToday(keyTaskSubmit))
		num, _ = strconv.ParseUint(string(bs), 10, 64)
		if err := statusB.Put(keyToday(keyTaskSubmit),
			[]byte(fmt.Sprint(num+1))); err != nil {
			return err
		}
		return nil
	})
}