Melkeydev / go-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework
https://docs.go-blueprint.dev/
MIT License
5.9k stars 333 forks source link

Project used echo framework generated with standard http package #101

Closed dr-dobermann closed 1 year ago

dr-dobermann commented 1 year ago

Generated code uses net/http package instead of echo ` package server

import ( "fmt" "net/http" "time" )

var port = 8080

type Server struct { port int }

func NewServer() *http.Server {

NewServer := &Server{
    port: port,
}

// Declare Server config
server := &http.Server{
    Addr:         fmt.Sprintf(":%d", NewServer.port),
    Handler:      NewServer.RegisterRoutes(),
    IdleTimeout:  time.Minute,
    ReadTimeout:  10 * time.Second,
    WriteTimeout: 30 * time.Second,
}

return server

}`

SudoSurya commented 1 year ago

No Its same for every project its just server config