mirror of
https://github.com/go-micro/go-micro.git
synced 2025-05-31 21:59:42 +02:00
31 lines
601 B
Go
31 lines
601 B
Go
package describe
|
|
|
|
import (
|
|
"github.com/asim/go-micro/cmd/micro/cmd"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
var flags []cli.Flag = []cli.Flag{
|
|
&cli.StringFlag{
|
|
Name: "format",
|
|
Value: "json",
|
|
Usage: "output a formatted description, e.g. json or yaml",
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
cmd.Register(&cli.Command{
|
|
Name: "describe",
|
|
Usage: "Describe a resource",
|
|
Subcommands: []*cli.Command{
|
|
{
|
|
Name: "service",
|
|
Aliases: []string{"s"},
|
|
Usage: "Describe a service resource, e.g. " + cmd.App().Name + " describe service helloworld",
|
|
Action: Service,
|
|
Flags: flags,
|
|
},
|
|
},
|
|
})
|
|
}
|