2016-02-03 22:54:02 +01:00
|
|
|
// Package common contains common utilities that are shared among other packages.
|
|
|
|
// See each sub-package for detail.
|
|
|
|
package common
|
2016-03-10 00:33:01 +01:00
|
|
|
|
|
|
|
import (
|
2016-12-09 13:17:34 +01:00
|
|
|
"errors"
|
2016-03-10 00:33:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2016-06-22 15:12:57 +02:00
|
|
|
ErrObjectReleased = errors.New("Object already released.")
|
|
|
|
ErrBadConfiguration = errors.New("Bad configuration.")
|
2016-08-18 08:34:21 +02:00
|
|
|
ErrObjectNotFound = errors.New("Object not found.")
|
|
|
|
ErrDuplicatedName = errors.New("Duplicated name.")
|
2016-03-10 00:33:01 +01:00
|
|
|
)
|
|
|
|
|
2016-12-28 00:53:29 +01:00
|
|
|
// Must panics if err is not nil.
|
|
|
|
func Must(err error) {
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|