mirror of
https://github.com/sundowndev/phoneinfoga.git
synced 2026-11-04 12:04:37 +00:00
fix: server logs output
This commit is contained in:
1 parent
f52e917364
commit
b46b1b9036
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -23,6 +23,6 @@ func Execute() {
|
||||
}
|
||||
|
||||
func exitWithError(err error) {
|
||||
fmt.Fprintf(color.Output, "%s\n", color.RedString(err.Error()))
|
||||
fmt.Fprintf(color.Error, "%s\n", color.RedString(err.Error()))
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/sundowndev/phoneinfoga/v2/web/v2/api"
|
||||
"github.com/sundowndev/phoneinfoga/v2/web/v2/api/handlers"
|
||||
@@ -12,6 +13,8 @@ type Server struct {
|
||||
}
|
||||
|
||||
func NewServer() *Server {
|
||||
gin.DefaultWriter = color.Output
|
||||
gin.DefaultErrorWriter = color.Error
|
||||
s := &Server{
|
||||
router: gin.Default(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user