Browse Source

En cours de développement

master
losyme 9 months ago
parent
commit
f82645254b
  1. 4
      go.mod
  2. 8
      go.sum
  3. 24
      internal/application/cmdline.go

4
go.mod

@ -7,12 +7,12 @@ require (
forge.chapril.org/dune/memory v0.0.0-20211020130347-474549465ac2
forge.chapril.org/dune/model v0.0.0-20211020130416-c773f1d2fa0b
forge.chapril.org/losyme/application v0.0.0-20211029102910-b7db6effc015
forge.chapril.org/losyme/cmdline v0.0.0-20211029103237-a8b69d332dec
forge.chapril.org/losyme/cmdline v0.0.0-20211029123655-4048a5bdcdbf
forge.chapril.org/losyme/config v0.0.0-20211025142334-51a8a7a73a4f
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-20211020125912-674a399f933c
forge.chapril.org/losyme/minikit v0.0.0-20211029103455-caef1a790f9b
forge.chapril.org/losyme/minikit v0.0.0-20211029123832-97d8ce60eb08
forge.chapril.org/losyme/scheduler v0.0.0-20211003204604-f14dada88faf
forge.chapril.org/losyme/util v0.0.0-20211025142031-fd89d32d86fe
forge.chapril.org/losyme/uuid v0.0.0-20211007082235-8d502169e034

8
go.sum

@ -8,8 +8,8 @@ forge.chapril.org/losyme/application v0.0.0-20211029102910-b7db6effc015 h1:mZQ2k
forge.chapril.org/losyme/application v0.0.0-20211029102910-b7db6effc015/go.mod h1:olQo5n5tnBRHq0wcc0lNbymvsXdTuYaCjNfd2d/+01w=
forge.chapril.org/losyme/buffer v0.0.0-20211003203540-771701f5a518 h1:B7wu0DWUwpt0Mw/VTuWQZikhV/VD6kc2iJWbIY+jgEM=
forge.chapril.org/losyme/buffer v0.0.0-20211003203540-771701f5a518/go.mod h1:4Yl585hmF3bWZfuwGF2Ym8ErykJZiF9yawlmK7szIkc=
forge.chapril.org/losyme/cmdline v0.0.0-20211029103237-a8b69d332dec h1:XCtKk3BLLpRRwIJaT4SF7u4sTXCRq69Q61aARKhQm7E=
forge.chapril.org/losyme/cmdline v0.0.0-20211029103237-a8b69d332dec/go.mod h1:NvAXbqc+LzdATB2GY72fvK4q2EtxxanmrNs03H7+Do4=
forge.chapril.org/losyme/cmdline v0.0.0-20211029123655-4048a5bdcdbf h1:9tohsrug0LKDOWSJEsAGouKvaoCcmggTLOpDW8DOvB8=
forge.chapril.org/losyme/cmdline v0.0.0-20211029123655-4048a5bdcdbf/go.mod h1:NvAXbqc+LzdATB2GY72fvK4q2EtxxanmrNs03H7+Do4=
forge.chapril.org/losyme/config v0.0.0-20211025142334-51a8a7a73a4f h1:WkVC71+0mHVg8qpgdTvFU9+fcfgY/vMMmzbaIQtJ4DU=
forge.chapril.org/losyme/config v0.0.0-20211025142334-51a8a7a73a4f/go.mod h1:rEfq3F8ofIUiZ5eMsA0ir9ODUT/tSuudsP1qgh8LMiE=
forge.chapril.org/losyme/crypto v0.0.0-20211003213528-e97d4ebea720 h1:tMwzjPmGvBb5/5Cx0OIPKqT9zMMR6gQn6398rwT0ghc=
@ -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-20211020125912-674a399f933c h1:AsWWDqFMigGp33sHDqGdJVVACiPYcY1ChSmBN7olBrk=
forge.chapril.org/losyme/logger v0.0.0-20211020125912-674a399f933c/go.mod h1:a3fN8yTjq5S/ramr03hIkutKM/35UsijUgRNKHjjlMU=
forge.chapril.org/losyme/minikit v0.0.0-20211029103455-caef1a790f9b h1:Vjr3cHtTXuFkaUueWVtcQgn2H8TI3/axTotO4+ggVbg=
forge.chapril.org/losyme/minikit v0.0.0-20211029103455-caef1a790f9b/go.mod h1:O77zCmZaGxc4+RvqqY9/i4Uuo0c6wcf6BEy+61OPHqQ=
forge.chapril.org/losyme/minikit v0.0.0-20211029123832-97d8ce60eb08 h1:39lS+jLfyJQbuG54Ol1ekrz3sJmx6EOr+CerUVP4/vk=
forge.chapril.org/losyme/minikit v0.0.0-20211029123832-97d8ce60eb08/go.mod h1:rFzapGhtvktGkbjcBavpoZuSDOYkVEiCXof4yawDtJ4=
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=

24
internal/application/cmdline.go

@ -16,25 +16,25 @@ type cmdLine struct {
func (app *Application) cmdlineInitialize() []*cmdline.Cmd {
cl := app.cmdLine
cmdDecrypt := &cmdline.Cmd{
Name: "decrypt",
Usage: "decrypt string",
Run: func() error {
cmdDecrypt := cmdline.NewCmd(
"decrypt",
"decrypt string",
cmdline.WithRunFn(func() error {
cl.runAfter = app.decrypt
return nil
},
}
}),
)
cmdDecrypt.StringFlag(&cl.strValue, "string", "", "string to decrypt")
cmdEncrypt := &cmdline.Cmd{
Name: "encrypt",
Usage: "encrypt string",
Run: func() error {
cmdEncrypt := cmdline.NewCmd(
"encrypt",
"encrypt string",
cmdline.WithRunFn(func() error {
cl.runAfter = app.encrypt
return nil
},
}
}),
)
cmdEncrypt.StringFlag(&cl.strValue, "string", "", "string to encrypt")

Loading…
Cancel
Save