v2ray-core/common/common.go

22 lines
484 B
Go
Raw Normal View History

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 (
2016-12-09 12:17:34 +00:00
"errors"
2016-03-09 23:33:01 +00:00
)
var (
2016-06-22 13:12:57 +00:00
ErrObjectReleased = errors.New("Object already released.")
ErrBadConfiguration = errors.New("Bad configuration.")
2016-08-18 06:34:21 +00:00
ErrObjectNotFound = errors.New("Object not found.")
ErrDuplicatedName = errors.New("Duplicated name.")
2016-03-09 23:33:01 +00:00
)
2016-12-27 23:53:29 +00:00
// Must panics if err is not nil.
func Must(err error) {
if err != nil {
panic(err)
}
}