Home / Function/ TestRouterGroupTooManyHandlers() — gin Function Reference

TestRouterGroupTooManyHandlers() — gin Function Reference

Architecture documentation for the TestRouterGroupTooManyHandlers() function in routergroup_test.go from the gin codebase.

Entity Profile

Relationship Graph

Source Code

routergroup_test.go lines 127–143

func TestRouterGroupTooManyHandlers(t *testing.T) {
	const (
		panicValue = "too many handlers"
		maximumCnt = abortIndex
	)
	router := New()
	handlers1 := make([]HandlerFunc, maximumCnt-1)
	router.Use(handlers1...)

	handlers2 := make([]HandlerFunc, maximumCnt+1)
	assert.PanicsWithValue(t, panicValue, func() {
		router.Use(handlers2...)
	})
	assert.PanicsWithValue(t, panicValue, func() {
		router.GET("/", handlers2...)
	})
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free