From ce9403ef84276f8c27a769a990c46f247cc15dd4 Mon Sep 17 00:00:00 2001 From: Roman Zipp Date: Sat, 15 Jan 2022 13:48:51 +0100 Subject: [PATCH] Fix http pipeline handler typo --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0f43e55..ce5f598 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ type Metadata struct { Version string } -func PipelineHandle(pipeline IPipeline, w http.ResponseWriter, r *http.Request) { +func PipelineHandler(pipeline IPipeline, w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(pipeline) } @@ -28,7 +28,7 @@ func IndexHandler(w http.ResponseWriter, r *http.Request) { func RegisterPipelineRoutes(r *mux.Router, pipelines []IPipeline) { for _, pipeline := range pipelines { r.HandleFunc("/"+pipeline.GetSlug(), func(w http.ResponseWriter, r *http.Request) { - PipelineHandle(pipeline, w, r) + PipelineHandler(pipeline, w, r) }) } }