mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-07 05:22:27 +00:00
Move the 8899
integer and string literals into a const
named DefaultApiServerPort
in shared
(#367)
This commit is contained in:
@@ -2,6 +2,7 @@ package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -11,6 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/up9inc/mizu/shared"
|
||||
"github.com/up9inc/mizu/shared/logger"
|
||||
)
|
||||
|
||||
@@ -37,7 +39,7 @@ func StartServer(app *gin.Engine) {
|
||||
|
||||
// Run server.
|
||||
logger.Log.Infof("Starting the server...")
|
||||
if err := app.Run(":8899"); err != nil {
|
||||
if err := app.Run(fmt.Sprintf(":%d", shared.DefaultApiServerPort)); err != nil {
|
||||
logger.Log.Errorf("Server is not running! Reason: %v", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user