Browse Source

En cours de développement

master
mls-361 9 months ago
parent
commit
64eaafab84
  1. 3
      cmd/main.go
  2. 5
      internal/components/components.go
  3. 4
      internal/server/server.go

3
cmd/main.go

@ -140,10 +140,9 @@ func run() error {
group, endCh := waitEnd(ccs.Server)
ccs.Startup()
demo.Start()
err := ccs.Server.Start()
err := ccs.Server.Run()
close(endCh)

5
internal/components/components.go

@ -64,7 +64,7 @@ type Router interface {
// Server AFAIRE.
type Server interface {
Start() error
Run() error
Stop()
}
@ -92,9 +92,6 @@ func New(app Application) *Components {
}
}
// Startup AFAIRE.
func (ccs *Components) Startup() {}
// Shutdown AFAIRE.
func (ccs *Components) Shutdown() {
if ccs.Logger != nil {

4
internal/server/server.go

@ -45,8 +45,8 @@ func Build(ccs *components.Components) (components.Server, error) {
return cs, nil
}
// Start AFAIRE.
func (cs *server) Start() error {
// Run AFAIRE.
func (cs *server) Run() error {
cs.logger.Info("Started") //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
err := cs.server.ListenAndServe()

Loading…
Cancel
Save