mirror of
https://github.com/pushbits/server.git
synced 2025-04-29 18:26:49 +02:00
17 lines
261 B
Go
17 lines
261 B
Go
package runner
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// Run starts the Gin engine.
|
|
func Run(engine *gin.Engine, address string, port int) error {
|
|
err := engine.Run(fmt.Sprintf("%s:%d", address, port))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|