Skip to content

Commit

Permalink
feat: Add handler function to repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
gowizzard committed Apr 9, 2024
1 parent 044b34e commit b13d6bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions internal/router/handler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Package router is to define the different router for the http server.
package router

import (
"github.com/gowizzard/mobyspulse/internal/handler"

Check failure on line 5 in internal/router/handler.go

View workflow job for this annotation

GitHub Actions / build-and-test

no required module provides package github.com/gowizzard/mobyspulse/internal/handler; to add it:
"github.com/gowizzard/mobyspulse/internal/redirect"

Check failure on line 6 in internal/router/handler.go

View workflow job for this annotation

GitHub Actions / build-and-test

no required module provides package github.com/gowizzard/mobyspulse/internal/redirect; to add it:
"net/http"
)

// Handler are to register the different handlers.
func Handler(mux *http.ServeMux) {
mux.HandleFunc(http.MethodGet+" /", redirect.Metrics)
mux.HandleFunc(http.MethodGet+" /favicon.ico", handler.Favicon)
mux.HandleFunc(http.MethodGet+" /metrics", handler.Metrics)
}

0 comments on commit b13d6bd

Please sign in to comment.