mirror of
https://github.com/pushbits/server.git
synced 2025-04-30 10:46:55 +02:00
18 lines
321 B
Go
18 lines
321 B
Go
// Package runner provides functions to run the web server.
|
|
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
|
|
}
|