update command generate
All checks were successful
Go Action / goaction (pull_request) Successful in 3m7s
All checks were successful
Go Action / goaction (pull_request) Successful in 3m7s
This commit is contained in:
@@ -8,13 +8,13 @@ import (
|
|||||||
"gitoa.ru/go-4devs/config"
|
"gitoa.ru/go-4devs/config"
|
||||||
"gitoa.ru/go-4devs/config/definition/generate"
|
"gitoa.ru/go-4devs/config/definition/generate"
|
||||||
"gitoa.ru/go-4devs/config/provider/chain"
|
"gitoa.ru/go-4devs/config/provider/chain"
|
||||||
"gitoa.ru/go-4devs/console"
|
"gitoa.ru/go-4devs/console/command"
|
||||||
"gitoa.ru/go-4devs/console/output"
|
"gitoa.ru/go-4devs/console/output"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Name = "config:generate"
|
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
|
var name string
|
||||||
|
|
||||||
value, err := in.Value(ctx, generate.OptionFile)
|
value, err := in.Value(ctx, generate.OptionFile)
|
||||||
@@ -53,16 +53,12 @@ func Execute(ctx context.Context, in config.Provider, _ output.Output) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Command() *console.Command {
|
func Command() command.Command {
|
||||||
return &console.Command{
|
return command.New(
|
||||||
Description: "",
|
Name,
|
||||||
Help: "",
|
"generate helper for configure command",
|
||||||
Version: "v0.0.1",
|
Execute,
|
||||||
Hidden: false,
|
command.Configure(generate.Configure),
|
||||||
Prepare: nil,
|
command.Handle(Handle),
|
||||||
Handle: Handle,
|
)
|
||||||
Name: Name,
|
|
||||||
Execute: Execute,
|
|
||||||
Configure: generate.Configure,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
2
go.mod
2
go.mod
@@ -2,4 +2,4 @@ module gitoa.ru/go-4devs/config
|
|||||||
|
|
||||||
go 1.24.0
|
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
4
go.sum
@@ -1,2 +1,2 @@
|
|||||||
gitoa.ru/go-4devs/console v0.2.0 h1:6lsbArs99GA8vGdnwNDThZNKjFNctNtTlSCUjhgwIpU=
|
gitoa.ru/go-4devs/console v0.3.0 h1:8A8UZXrDAlBDWGWUsWckyEeYE3lowreZANCSRYjzBdM=
|
||||||
gitoa.ru/go-4devs/console v0.2.0/go.mod h1:xi4Svw7T+lylckAQiJQS/2qwDwF4YbIanlhcbQrBAiI=
|
gitoa.ru/go-4devs/console v0.3.0/go.mod h1:PG/Zyj1dLh7eFlj9bgnV58+Ys6I/MTrS0q9W7oD7z4U=
|
||||||
|
|||||||
Reference in New Issue
Block a user