func NewOffsetManagerFromClient(group string, client Client) (OffsetManager, error) {
	if client.Closed() {
		return nil, ErrClosedClient
	}
	om := &offsetManager{
		client: client,
		conf:   client.Config(),
		group:  group,
		poms:   make(map[string]map[int32]*partitionOffsetManager),
		boms:   make(map[*Broker]*brokerOffsetManager),
	}
	return om, nil
}
NewOffsetManagerFromClient creates a new OffsetManager from the given client.
It is still necessary to call Close() on the underlying client when finished with the partition manager.
package sarama
import (
	"sync"
	"time"
)
type OffsetManager interface {
	ManagePartition(topic string, partition int32) (PartitionOffsetManager, error)
	Close() error
}
type offsetManager struct {
	client Client
	conf   *Config
	group  string
	lock sync.Mutex
	poms map[string]map[int32]*partitionOffsetManager
	boms map[*Broker]*brokerOffsetManager
}