2016-02-03 21:54:02 +00:00
|
|
|
// Package common contains common utilities that are shared among other packages.
|
|
|
|
// See each sub-package for detail.
|
|
|
|
package common
|
2016-03-09 23:33:01 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2016-06-22 13:12:57 +00:00
|
|
|
ErrObjectReleased = errors.New("Object already released.")
|
|
|
|
ErrBadConfiguration = errors.New("Bad configuration.")
|
2016-03-09 23:33:01 +00:00
|
|
|
)
|
|
|
|
|
2016-03-11 22:51:58 +00:00
|
|
|
// Releasable interface is for those types that can release its members.
|
2016-03-09 23:33:01 +00:00
|
|
|
type Releasable interface {
|
2016-03-11 22:51:58 +00:00
|
|
|
// Release releases all references to accelerate garbage collection.
|
2016-03-09 23:33:01 +00:00
|
|
|
Release()
|
|
|
|
}
|