Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #26 from osspkg/add-app-template
Browse files Browse the repository at this point in the history
fix app generator
  • Loading branch information
markus621 authored Mar 10, 2024
2 parents 3b0b7b3 + 06b22c5 commit 3496362
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ go 1.20

require (
go.osspkg.com/algorithms v1.3.1
go.osspkg.com/goppy/console v0.3.1
go.osspkg.com/goppy/errors v0.3.0
go.osspkg.com/goppy/iofile v0.3.2
go.osspkg.com/goppy/console v0.3.2
go.osspkg.com/goppy/errors v0.3.1
go.osspkg.com/goppy/iofile v0.3.3
go.osspkg.com/goppy/shell v0.3.0
go.osspkg.com/goppy/syscall v0.3.0
golang.org/x/mod v0.16.0
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ go.osspkg.com/algorithms v1.3.1 h1:Weh0Z4dMzHFRJTfMva/mU6Uk95wSRGwt1Saj2sfz3Wc=
go.osspkg.com/algorithms v1.3.1/go.mod h1:kj+oVK7UDQlXMKleMTYzbEEpUAXC2tzRBtki7F5EbXc=
go.osspkg.com/goppy/console v0.3.1 h1:fg1HDeev01h55k29B6LyzCDf3b2sn5yl3YYOGN2f4w0=
go.osspkg.com/goppy/console v0.3.1/go.mod h1:TpDVGqmJaKuxemUUPj/cNyLEo3jlyL/T0iOzsZDmjjY=
go.osspkg.com/goppy/console v0.3.2 h1:ifgdXbpk21QX0VJb1yRXDhb/CtaUQ2fdBQZ/QVmzOzg=
go.osspkg.com/goppy/console v0.3.2/go.mod h1:9/bBCgne9b/tpDS/PcxF2QLcKzQv1/cjHyMQ+GfbgUA=
go.osspkg.com/goppy/errors v0.3.0 h1:n98V9gW8UOfooY9Y9FNwV7oznKGQxrIr/J19brqayzc=
go.osspkg.com/goppy/errors v0.3.0/go.mod h1:rbBTNHK0wpGi3FgJ4M27n7LOvB3Aw6kKc0Q4np16wh0=
go.osspkg.com/goppy/errors v0.3.1 h1:Mc6AQW1P+dWLN08CvKu/PO1rRK8IcX2kRtOpf0ye+1Q=
go.osspkg.com/goppy/errors v0.3.1/go.mod h1:rbBTNHK0wpGi3FgJ4M27n7LOvB3Aw6kKc0Q4np16wh0=
go.osspkg.com/goppy/iofile v0.3.2 h1:dvI7AfSZyx7NhSdqg+iFECjSd0+rbgqg0xWvRjXkHpc=
go.osspkg.com/goppy/iofile v0.3.2/go.mod h1:bdslt9epbltr/N/8jtbGDiLIKbpIHwgYh+ax4SHI6Og=
go.osspkg.com/goppy/iofile v0.3.3 h1:kIs9zH4smzqeaPy63zjfjzXkP4G+gMPlDR8PJGYs+zg=
go.osspkg.com/goppy/iofile v0.3.3/go.mod h1:ptkFXQBLw2dGCpWBbWwQTLOe5QvH2GJmEshHkiz50hk=
go.osspkg.com/goppy/iosync v0.3.0 h1:eClduMtjVZUPpNYzHm7EClCa3y58lB/FlIRtHgyU9YE=
go.osspkg.com/goppy/iosync v0.3.0/go.mod h1:Ocol//DRF4n0m40jFmYBxnjHtFjeyeO0RcY/pwOCtsg=
go.osspkg.com/goppy/shell v0.3.0 h1:h1w3vRoaro2d6s/A1Tvghq5de8wHDwoobNONwhkxiJc=
Expand Down
20 changes: 10 additions & 10 deletions internal/appgoppy/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ func main() {
app.AppName("{{.app_name}}")
app.AppVersion(Version)
app.Plugins(
{{if .mod_metrics}}metrics.WithMetrics(),{{end}}
{{if .mod_metrics}}metrics.WithServer(),{{end}}
{{if .mod_geoip}}geoip.WithMaxMindGeoIP(),{{end}}
{{if .mod_oauth}}auth.WithOAuth(),{{end}}
{{if .mod_auth_jwt}}auth.WithJWT(),{{end}}
{{if .mod_db_mysql}}ormmysql.WithMySQL(),{{end}}
{{if .mod_db_sqlite}}ormsqlite.WithSQLite(),{{end}}
{{if .mod_db_postgre}}ormpgsql.WithPostgreSQL(),{{end}}
{{if .mod_web_server}}web.WithHTTP(),{{end}}
{{if .mod_web_client}}web.WithHTTPClient(),{{end}}
{{if .mod_websocket_server}}ws.WithWebsocketServer(),{{end}}
{{if .mod_websocket_client}}ws.WithWebsocketClient(),{{end}}
{{if .mod_dns_server}}xdns.WithDNSServer(),{{end}}
{{if .mod_dns_client}}xdns.WithDNSClient(),{{end}}
{{if .mod_db_mysql}}ormmysql.WithClient(),{{end}}
{{if .mod_db_sqlite}}ormsqlite.WithClient(),{{end}}
{{if .mod_db_postgre}}ormpgsql.WithClient(),{{end}}
{{if .mod_web_server}}web.WithServer(),{{end}}
{{if .mod_web_client}}web.WithClient(),{{end}}
{{if .mod_websocket_server}}ws.WithServer(),{{end}}
{{if .mod_websocket_client}}ws.WithClient(),{{end}}
{{if .mod_dns_server}}xdns.WithServer(),{{end}}
{{if .mod_dns_client}}xdns.WithClient(),{{end}}
{{if .mod_unixsocket_server}}unixsocket.WithServer(),{{end}}
{{if .mod_unixsocket_client}}unixsocket.WithClient(),{{end}}
)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
func main() {
console.ShowDebug(true)

app := console.New("devtool", "help devtool")
app := console.New("devtool", "Development Tool")

app.RootCommand(console.NewCommand(func(setter console.CommandSetter) {
setter.ExecFunc(func(_ []string) {
Expand Down

0 comments on commit 3496362

Please sign in to comment.