1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

version 12.1.5

Former-commit-id: cda69f08955cb0d594e98bf26197ee573cbba4b2
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-02-02 16:29:06 +02:00
parent e04ea83c04
commit 3093d65363
76 changed files with 9647 additions and 366 deletions

View File

@@ -182,7 +182,7 @@ const delim = "\n"
func (g *Group) Error() (s string) {
if len(g.Errors) > 0 {
msgs := make([]string, len(g.Errors), len(g.Errors))
msgs := make([]string, len(g.Errors))
for i, err := range g.Errors {
msgs[i] = err.Error()
}
@@ -320,21 +320,6 @@ func sortGroups(groups []*Group) {
})
}
func tryGetTypeText(typ interface{}) string {
if typ == nil {
return ""
}
switch v := typ.(type) {
case string:
return v
case fmt.Stringer:
return v.String()
default:
return ""
}
}
func isNotNil(err error) bool {
if g, ok := err.(*Group); ok {
if len(g.Errors) > 0 {

View File

@@ -136,7 +136,7 @@ func TestGroup(t *testing.T) {
t.Run("Walk", func(t *testing.T) {
expectedEntries := 4
Walk(g, func(typ interface{}, err error) {
_ = Walk(g, func(typ interface{}, err error) {
g.IncludeChildren = false
childAPIErrorsGroup.IncludeChildren = false
childAPIErrorsGroup2.IncludeChildren = false