Skip to content

Commit

Permalink
#130 move app:serve to foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
Reindert Vetter committed Apr 11, 2021
1 parent 4961e73 commit 98c755b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 78 deletions.
55 changes: 0 additions & 55 deletions app/console/commands/app_serve.go

This file was deleted.

2 changes: 1 addition & 1 deletion app/console/kernel.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func NewKernel(app inter.App) console.Kernel {
return console.Kernel{
App: app,
Commands: []inter.Command{
commands.AppServe{},
console.AppServe{},
console.LogClear{},
commands.ExampleCommand{},
},
Expand Down
9 changes: 4 additions & 5 deletions bootstrap/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package bootstrap
import (
"github.com/confetti-framework/contract/inter"
"github.com/confetti-framework/foundation"
net "net/http"
"src/app/console"
"src/app/http"
"src/app/http/decorator"
Expand Down Expand Up @@ -56,10 +55,10 @@ func NewAppFromBoot() inter.App {
console.NewKernel(app),
)

app.Bind(
(*net.HandlerFunc)(nil),
HandleHttpKernel,
)
// Bind this function so that a new application can be created later. This is
// necessary because an application must be made for the command. Later
// applications must be made for each request.
app.Bind(inter.AppProvider, NewAppFromBoot)

return app
}
15 changes: 0 additions & 15 deletions bootstrap/http_kernel_handler.go

This file was deleted.

4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module src
go 1.16

require (
github.com/confetti-framework/contract v0.2.2
github.com/confetti-framework/contract v0.2.3
github.com/confetti-framework/errors v0.11.0
github.com/confetti-framework/foundation v0.8.0
github.com/confetti-framework/foundation v0.8.2
github.com/confetti-framework/support v0.3.1
github.com/confetti-framework/syslog v0.1.1
github.com/confetti-framework/validation v0.1.0
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ github.com/confetti-framework/contract v0.2.1 h1:8mQWISbt1MpDcSOEygbY2SOrWaxgss7
github.com/confetti-framework/contract v0.2.1/go.mod h1:Svbmzd7rTz6h7l7wM6QWcA6IJ44CejZ3Lc7phALp7Qs=
github.com/confetti-framework/contract v0.2.2 h1:vYZknr2G3U5XoP5ETvXimUah3mclEysXvy8hrX8MRMM=
github.com/confetti-framework/contract v0.2.2/go.mod h1:yseIvJswP10ujwbu2UEgv+fFxiG0zhSekSh+jMtuso4=
github.com/confetti-framework/contract v0.2.3 h1:2NpjMIFKs5/v8cbkO8i1cdhRuVGZ0SrweEErIbEAu/Y=
github.com/confetti-framework/contract v0.2.3/go.mod h1:yseIvJswP10ujwbu2UEgv+fFxiG0zhSekSh+jMtuso4=
github.com/confetti-framework/errors v0.11.0-rc.1/go.mod h1:a59waUvDS3t8nOeqI0yQDrhILEicAvlca7Kbeilsrao=
github.com/confetti-framework/errors v0.11.0 h1:rIOBgIpw5zGb25q5Pfg2cIk4vMCQb+Gs/kdaEze7BHY=
github.com/confetti-framework/errors v0.11.0/go.mod h1:a59waUvDS3t8nOeqI0yQDrhILEicAvlca7Kbeilsrao=
Expand All @@ -26,6 +28,8 @@ github.com/confetti-framework/foundation v0.7.1 h1:SDT8vUnxZJprkwahG+cNrR7yEe0xy
github.com/confetti-framework/foundation v0.7.1/go.mod h1:hfByJjIm3tUYmxXnu8enjXq2gVyvyPxV7LCVKoweA6g=
github.com/confetti-framework/foundation v0.8.0 h1:Ty7fC/DvMzbbXzb5bcOS4HszYsM0CBPW/Qj0LNcTjHs=
github.com/confetti-framework/foundation v0.8.0/go.mod h1:qLMjZa5YVPlDKHew+Yr3OpZPnxM9XG0BKJ1KPHdac+Q=
github.com/confetti-framework/foundation v0.8.2 h1:b2RY92L0yC6uolTGE3J3e1qibdaZxl5cBulkszEZrPk=
github.com/confetti-framework/foundation v0.8.2/go.mod h1:PiPc8FuF65nuDPlbqRgr1A3fBFOmKfhsTU9cqCr6Csg=
github.com/confetti-framework/support v0.2.0-rc.1/go.mod h1:uwOTcc+vAtkzr5GihkCzjv11YVI15UJMhfU2HLRCk/A=
github.com/confetti-framework/support v0.2.3 h1:AOzZVtPeJlZBExW2SjYY3R3973ytve2FvmZoETqluN8=
github.com/confetti-framework/support v0.2.3/go.mod h1:HtyauB5vd5R+85mwosRpD0h6InS39HDJfKpkjXzdU3s=
Expand All @@ -49,6 +53,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/jedib0t/go-pretty/v6 v6.1.0 h1:NVS2PT3ZvzMb47DzS50cmsK6xkf8SSyLfroSSIG20JI=
github.com/jedib0t/go-pretty/v6 v6.1.0/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0=
github.com/jedib0t/go-pretty/v6 v6.1.1 h1:h+1mRYOgvlQn10S+IocMkJm/DQiLyumoHHh3ps+pA44=
github.com/jedib0t/go-pretty/v6 v6.1.1/go.mod h1:+nE9fyyHGil+PuISTCrp7avEdo6bqoMwqZnuiK2r2a0=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
Expand Down Expand Up @@ -172,6 +178,8 @@ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210317153231-de623e64d2a6 h1:EC6+IGYTjPpRfv9a2b/6Puw0W+hLtAhkV1tPsXhutqs=
golang.org/x/term v0.0.0-20210317153231-de623e64d2a6/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72 h1:VqE9gduFZ4dbR7XoL77lHFp0/DyDUBKSXK7CMFkVcV0=
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
Expand Down

0 comments on commit 98c755b

Please sign in to comment.