refactor: clean up code, remove unused methods

This commit is contained in:
Jonas Kaninda
2024-10-27 07:57:52 +01:00
parent cbedfe9ccc
commit 9dc918ece9
4 changed files with 9 additions and 64 deletions

View File

@@ -12,6 +12,7 @@ You may get a copy of the License at
import (
"fmt"
"github.com/common-nighthawk/go-figure"
"github.com/jedib0t/go-pretty/v6/table"
"github.com/jkaninda/goma-gateway/util"
)
@@ -22,3 +23,11 @@ func Intro() {
fmt.Println("Copyright (c) 2024 Jonas Kaninda")
fmt.Println("Starting Goma Gateway server...")
}
func printRoute(routes []Route) {
t := table.NewWriter()
t.AppendHeader(table.Row{"Name", "Route", "Rewrite", "Destination"})
for _, route := range routes {
t.AppendRow(table.Row{route.Name, route.Path, route.Rewrite, route.Destination})
}
fmt.Println(t.Render())
}