Damnit again
Former-commit-id: b394f26caf0df7d113ac4cc7dacc9c544af6897f
This commit is contained in:
21
server/new.go
Normal file
21
server/new.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"local/router"
|
||||
"local/rssmon3/config"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
Port string
|
||||
router *router.Router
|
||||
}
|
||||
|
||||
func New() *Server {
|
||||
config := config.Values()
|
||||
s := &Server{
|
||||
Port: ":" + strings.TrimPrefix(config.Port, ":"),
|
||||
router: router.New(),
|
||||
}
|
||||
return s
|
||||
}
|
||||
Reference in New Issue
Block a user