mirror of
https://github.com/NotAShelf/goblin.git
synced 2024-11-22 21:31:07 +00:00
feat: use router handler from internal package
This commit is contained in:
parent
61ed4fb1c4
commit
ce5c3376c2
1 changed files with 3 additions and 3 deletions
|
@ -8,12 +8,11 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
// "github.com/gorilla/mux" // Import Gorilla Mux
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
|
||||||
"goblin/internal/config"
|
"goblin/internal/config"
|
||||||
"goblin/internal/paste"
|
"goblin/internal/paste"
|
||||||
// "goblin/internal/router"
|
"goblin/internal/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -63,7 +62,8 @@ var rootCmd = &cobra.Command{
|
||||||
log.Infof("Private mode: %v", private)
|
log.Infof("Private mode: %v", private)
|
||||||
|
|
||||||
// Create the router and start the server using the router package
|
// Create the router and start the server using the router package
|
||||||
// r := router.NewRouter()
|
router := router.NewRouter()
|
||||||
|
http.Handle("/", router)
|
||||||
|
|
||||||
// Add a new route for Prometheus metrics
|
// Add a new route for Prometheus metrics
|
||||||
http.Handle("/metrics", promhttp.Handler()) // Use Prometheus handler
|
http.Handle("/metrics", promhttp.Handler()) // Use Prometheus handler
|
||||||
|
|
Loading…
Reference in a new issue