Merge pull request 'update command generate' (#44) from generate into master
All checks were successful
Go Action / goaction (push) Successful in 36s

Reviewed-on: #44
This commit was merged in pull request #44.
This commit is contained in:
2026-01-06 00:18:43 +03:00
3 changed files with 13 additions and 17 deletions

View File

@@ -8,13 +8,13 @@ import (
"gitoa.ru/go-4devs/config"
"gitoa.ru/go-4devs/config/definition/generate"
"gitoa.ru/go-4devs/config/provider/chain"
"gitoa.ru/go-4devs/console"
"gitoa.ru/go-4devs/console/command"
"gitoa.ru/go-4devs/console/output"
)
const Name = "config:generate"
func Handle(ctx context.Context, in config.Provider, out output.Output, next console.Action) error {
func Handle(ctx context.Context, in config.Provider, out output.Output, next command.ExecuteFn) error {
var name string
value, err := in.Value(ctx, generate.OptionFile)
@@ -53,16 +53,12 @@ func Execute(ctx context.Context, in config.Provider, _ output.Output) error {
return nil
}
func Command() *console.Command {
return &console.Command{
Description: "",
Help: "",
Version: "v0.0.1",
Hidden: false,
Prepare: nil,
Handle: Handle,
Name: Name,
Execute: Execute,
Configure: generate.Configure,
}
func Command() command.Command {
return command.New(
Name,
"generate helper for configure command",
Execute,
command.Configure(generate.Configure),
command.Handle(Handle),
)
}

2
go.mod
View File

@@ -2,4 +2,4 @@ module gitoa.ru/go-4devs/config
go 1.24.0
require gitoa.ru/go-4devs/console v0.2.0
require gitoa.ru/go-4devs/console v0.3.0

4
go.sum
View File

@@ -1,2 +1,2 @@
gitoa.ru/go-4devs/console v0.2.0 h1:6lsbArs99GA8vGdnwNDThZNKjFNctNtTlSCUjhgwIpU=
gitoa.ru/go-4devs/console v0.2.0/go.mod h1:xi4Svw7T+lylckAQiJQS/2qwDwF4YbIanlhcbQrBAiI=
gitoa.ru/go-4devs/console v0.3.0 h1:8A8UZXrDAlBDWGWUsWckyEeYE3lowreZANCSRYjzBdM=
gitoa.ru/go-4devs/console v0.3.0/go.mod h1:PG/Zyj1dLh7eFlj9bgnV58+Ys6I/MTrS0q9W7oD7z4U=