Move source file to the root of pkg
I do not yet know how i will need to organize them, if indeed i need to organize them to a finer granularity than single files, so there is no point on doing Java-like packages.
This commit is contained in:
parent
6d48aa6630
commit
989cdd7da7
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
|
||||
"dev.tandem.ws/tandem/numerus/pkg/router"
|
||||
numerus "dev.tandem.ws/tandem/numerus/pkg"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -23,7 +23,7 @@ func main() {
|
|||
|
||||
srv := http.Server{
|
||||
Addr: ":8080",
|
||||
Handler: router.NewRouter(dbpool),
|
||||
Handler: numerus.NewRouter(dbpool),
|
||||
ReadTimeout: 5 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
IdleTimeout: 2 * time.Minute,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package logger
|
||||
package pkg
|
||||
|
||||
import (
|
||||
"log"
|
|
@ -1,4 +1,4 @@
|
|||
package router
|
||||
package pkg
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -6,7 +6,6 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
"dev.tandem.ws/tandem/numerus/pkg/logger"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
)
|
||||
|
||||
|
@ -47,6 +46,6 @@ func NewRouter(db *pgxpool.Pool) http.Handler {
|
|||
}
|
||||
})
|
||||
var handler http.Handler = router
|
||||
handler = logger.Logger(handler)
|
||||
handler = Logger(handler)
|
||||
return handler
|
||||
}
|
Loading…
Reference in New Issue