Browse Source

En cours de développement

master
losyme 9 months ago
parent
commit
576cfb0aa0
  1. 2
      go.mod
  2. 4
      go.sum
  3. 8
      internal/application/cmdline.go
  4. 16
      internal/application/config.go

2
go.mod

@ -12,7 +12,7 @@ require (
forge.chapril.org/losyme/errors v0.0.0-20211003204336-ad5510c24b40
forge.chapril.org/losyme/kong v0.0.0-20211028140748-e4aa975543a6
forge.chapril.org/losyme/logger v0.0.0-20211029145618-53281f68122e
forge.chapril.org/losyme/minikit v0.0.0-20211029165330-669b33c46628
forge.chapril.org/losyme/minikit v0.0.0-20211029170949-2682f52f83da
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034
)

4
go.sum

@ -22,8 +22,8 @@ forge.chapril.org/losyme/kvfmt v0.0.0-20211003204256-34ac32764dae h1:RdYWXKy+OQN
forge.chapril.org/losyme/kvfmt v0.0.0-20211003204256-34ac32764dae/go.mod h1:wnVjwnCO2vFLLZ1EgFuFws1n8XLluufsGsdozGYSA7c=
forge.chapril.org/losyme/logger v0.0.0-20211029145618-53281f68122e h1:646YpIqqMaIMvmURBgxKx6vM2KI2GUZ/tk0HQT1AehI=
forge.chapril.org/losyme/logger v0.0.0-20211029145618-53281f68122e/go.mod h1:a3fN8yTjq5S/ramr03hIkutKM/35UsijUgRNKHjjlMU=
forge.chapril.org/losyme/minikit v0.0.0-20211029165330-669b33c46628 h1:VHHaTogScX8bRi9pAvclMTu7Gmniev5m+FyP9Jq7jD8=
forge.chapril.org/losyme/minikit v0.0.0-20211029165330-669b33c46628/go.mod h1:ZfaneFtHmdtMHzkVKGe1E48wpxYXMf0fgxJdYq3I+nk=
forge.chapril.org/losyme/minikit v0.0.0-20211029170949-2682f52f83da h1:q1J0h3ZOOWmDah6dVlSG11K+Xm3rkkNIUFVYCbDUE6Q=
forge.chapril.org/losyme/minikit v0.0.0-20211029170949-2682f52f83da/go.mod h1:ZfaneFtHmdtMHzkVKGe1E48wpxYXMf0fgxJdYq3I+nk=
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf h1:5OIlwVBTdvjCXh2JHAh5rq8FgSe1lXuuKDFtO/ZRaRM=
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf/go.mod h1:VNjFKl0Q2vvLDnR9tdNdTIZDLQNlR+gcIGNf2aIYv3o=
forge.chapril.org/losyme/util v0.0.0-20211025142031-fd89d32d86fe h1:xjMUKHxtG8jz57JyOxgNLlRaPLJeQvMV9K3HNlhKDB8=

8
internal/application/cmdline.go

@ -13,7 +13,7 @@ type cmdLine struct {
runAfter func() error
}
func (app *Application) cmdlineInitialize() []*cmdline.Cmd {
func (app *Application) cmdlineInitialize(c *cmdline.CmdLine) {
cl := app.cmdLine
cmdDecrypt := cmdline.NewCmd(
@ -38,10 +38,8 @@ func (app *Application) cmdlineInitialize() []*cmdline.Cmd {
cmdEncrypt.StringFlag(&cl.strValue, "string", "", "string to encrypt")
return []*cmdline.Cmd{
cmdDecrypt,
cmdEncrypt,
}
c.AddCmd(cmdDecrypt)
c.AddCmd(cmdEncrypt)
}
/*

16
internal/application/config.go

@ -8,16 +8,16 @@ package application
import "forge.chapril.org/losyme/config"
func (app *Application) configInitialize(cfg *config.Config) {
cfg.Set("trace", "logger", "level")
cfg.Set([]string{"stderr"}, "logger", "outputs")
func (app *Application) configInitialize(c *config.Config) {
c.Set("trace", "logger", "level")
c.Set([]string{"stderr"}, "logger", "outputs")
cfg.Set(5635, "server", "port")
cfg.Set("1m", "server", "idletimeout")
cfg.Set("5s", "server", "readtimeout")
cfg.Set("10s", "server", "writetimeout")
c.Set(5635, "server", "port")
c.Set("1m", "server", "idletimeout")
c.Set("5s", "server", "readtimeout")
c.Set("10s", "server", "writetimeout")
cfg.Set("memory", "storage")
c.Set("memory", "storage")
}
/*

Loading…
Cancel
Save