Skip to content

Commit

Permalink
fix: link
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbrzzl committed Jan 1, 2025
1 parent 921547e commit d13aae8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/gookit/validate v1.5.4
github.com/goravel/framework v1.15.1
github.com/rs/cors v1.11.1
github.com/savioxavier/termlink v1.4.1
github.com/spf13/cast v1.7.1
github.com/stretchr/testify v1.10.0
github.com/unrolled/secure v1.17.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,6 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc=
github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
github.com/savioxavier/termlink v1.4.1 h1:pFcd+XH8iQjL+2mB4buCDUo+CMt5kKsr8jGG+VLfYAg=
github.com/savioxavier/termlink v1.4.1/go.mod h1:5T5ePUlWbxCHIwyF8/Ez1qufOoGM89RCg9NvG+3G3gc=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
Expand Down
9 changes: 4 additions & 5 deletions route.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/goravel/framework/contracts/route"
"github.com/goravel/framework/support"
"github.com/goravel/framework/support/color"
"github.com/savioxavier/termlink"
)

var globalRecoverCallback func(ctx contractshttp.Context, err any) = func(ctx contractshttp.Context, err any) {
Expand Down Expand Up @@ -110,7 +109,7 @@ func (r *Route) Recover(callback func(ctx contractshttp.Context, err any)) {

func (r *Route) Listen(l net.Listener) error {
r.outputRoutes()
color.Green().Println(termlink.Link("[HTTP] Listening and serving HTTP on", "http://"+l.Addr().String()))
color.Green().Println("[HTTP] Listening on: http://" + l.Addr().String())

r.server = &http.Server{
Addr: l.Addr().String(),
Expand All @@ -131,7 +130,7 @@ func (r *Route) ListenTLS(l net.Listener) error {

func (r *Route) ListenTLSWithCert(l net.Listener, certFile, keyFile string) error {
r.outputRoutes()
color.Green().Println(termlink.Link("[HTTPS] Listening and serving HTTPS on", "https://"+l.Addr().String()))
color.Green().Println("[HTTPS] Listening on: https://" + l.Addr().String())

r.tlsServer = &http.Server{
Addr: l.Addr().String(),
Expand All @@ -158,7 +157,7 @@ func (r *Route) Run(host ...string) error {
}

r.outputRoutes()
color.Green().Println(termlink.Link("[HTTP] Listening and serving HTTP on", "http://"+host[0]))
color.Green().Println("[HTTP] Listening on: http://" + host[0])

r.server = &http.Server{
Addr: host[0],
Expand Down Expand Up @@ -199,7 +198,7 @@ func (r *Route) RunTLSWithCert(host, certFile, keyFile string) error {
}

r.outputRoutes()
color.Green().Println(termlink.Link("[HTTPS] Listening and serving HTTPS on", "https://"+host))
color.Green().Println("[HTTPS] Listening on: https://" + host)

r.tlsServer = &http.Server{
Addr: host,
Expand Down

0 comments on commit d13aae8

Please sign in to comment.