This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new d0162a5  change all flags of `event report` to non-required (#89)
d0162a5 is described below

commit d0162a5dee60e3bbf0ab71c9115c0d6813286837
Author: Hoshea Jiang <[email protected]>
AuthorDate: Tue Feb 2 23:03:12 2021 +0800

    change all flags of `event report` to non-required (#89)
---
 README.md                         |  2 +-
 internal/commands/event/report.go | 40 ++++++++++++++++-----------------------
 2 files changed, 17 insertions(+), 25 deletions(-)

diff --git a/README.md b/README.md
index 8f101cd..66eff89 100644
--- a/README.md
+++ b/README.md
@@ -384,7 +384,7 @@ You can imitate the content of [the default template 
file](examples/global.yml)
 
 <details>
 
-<summary>event report --uuid=uuid --service=service --name=name 
--message=message --startTime=startTime [--endTime=endTime] 
[--instance=instance] [--endpoint=endpoint] [--type=type] 
[parameters...]</summary>
+<summary>event report [--uuid=uuid] [--service=service] [--name=name] 
[--message=message] [--startTime=startTime] [--endTime=endTime] 
[--instance=instance] [--endpoint=endpoint] [--type=type] 
[parameters...]</summary>
 
 `event report` reports an event to OAP server via gRPC.
 
diff --git a/internal/commands/event/report.go 
b/internal/commands/event/report.go
index 8038361..d5c1807 100644
--- a/internal/commands/event/report.go
+++ b/internal/commands/event/report.go
@@ -37,29 +37,24 @@ var reportCommand = cli.Command{
        ArgsUsage: "[parameters...]",
        Flags: []cli.Flag{
                cli.StringFlag{
-                       Name:     "uuid",
-                       Usage:    "Unique `ID` of the event.",
-                       Required: true,
+                       Name:  "uuid",
+                       Usage: "Unique `ID` of the event.",
                },
                cli.StringFlag{
-                       Name:     "service",
-                       Usage:    "The service of the event occurred on.",
-                       Required: true,
+                       Name:  "service",
+                       Usage: "The service of the event occurred on.",
                },
                cli.StringFlag{
-                       Name:     "instance",
-                       Usage:    "The service instance of the event occurred 
on.",
-                       Required: false,
+                       Name:  "instance",
+                       Usage: "The service instance of the event occurred on.",
                },
                cli.StringFlag{
-                       Name:     "endpoint",
-                       Usage:    "The endpoint of the event occurred on",
-                       Required: false,
+                       Name:  "endpoint",
+                       Usage: "The endpoint of the event occurred on",
                },
                cli.StringFlag{
-                       Name:     "name",
-                       Usage:    "The name of the event. For example, 'Reboot' 
and 'Upgrade' etc.",
-                       Required: true,
+                       Name:  "name",
+                       Usage: "The name of the event. For example, 'Reboot' 
and 'Upgrade' etc.",
                },
                cli.GenericFlag{
                        Name:  "type",
@@ -71,19 +66,16 @@ var reportCommand = cli.Command{
                        },
                },
                cli.StringFlag{
-                       Name:     "message",
-                       Usage:    "The detail of the event. This should be a 
one-line message that briefly describes why the event is reported.",
-                       Required: true,
+                       Name:  "message",
+                       Usage: "The detail of the event. This should be a 
one-line message that briefly describes why the event is reported.",
                },
                cli.Int64Flag{
-                       Name:     "startTime",
-                       Usage:    "The start time (in milliseconds) of the 
event, measured between the current time and midnight, January 1, 1970 UTC.",
-                       Required: true,
+                       Name:  "startTime",
+                       Usage: "The start time (in milliseconds) of the event, 
measured between the current time and midnight, January 1, 1970 UTC.",
                },
                cli.Int64Flag{
-                       Name:     "endTime",
-                       Usage:    "The end time (in milliseconds) of the event, 
measured between the current time and midnight, January 1, 1970 UTC.",
-                       Required: false,
+                       Name:  "endTime",
+                       Usage: "The end time (in milliseconds) of the event, 
measured between the current time and midnight, January 1, 1970 UTC.",
                },
        },
        Action: func(ctx *cli.Context) error {

Reply via email to