1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00
sap-jenkins-library/integration/testdata/TestGolangIntegration/golang-project1/pkg/http/middlewares/multiple.go
Siarhei Pazdniakou d6916e8953
feat(golangBuild): Integration tests (#3575)
* Add entryPointPath option

* Integration tests for golangBuild

* Revert "Add entryPointPath option"

This reverts commit b541e64a4f.

Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
2022-02-24 16:57:56 +01:00

21 lines
293 B
Go

package middlewares
import "net/http"
type Middleware func(http.HandlerFunc) http.HandlerFunc
func MultipleMiddleware(h http.HandlerFunc, m ...Middleware) http.HandlerFunc {
if len(m) < 1 {
return h
}
wrapped := h
for i := range m {
wrapped = m[i](wrapped)
}
return wrapped
}