Files
weave-scope/vendor/github.com/weaveworks/weave/common/utils.go
2015-12-04 09:57:44 +00:00

21 lines
325 B
Go

package common
import (
"strings"
)
// Assert test is true, panic otherwise
func Assert(test bool) {
if !test {
panic("Assertion failure")
}
}
func ErrorMessages(errors []error) string {
var result []string
for _, err := range errors {
result = append(result, err.Error())
}
return strings.Join(result, "\n")
}