From c40e176bd59e2f0177a73eef7e40e0dfdd52deb2 Mon Sep 17 00:00:00 2001 From: Shivam Purohit Date: Fri, 22 Mar 2024 00:52:13 +0530 Subject: [PATCH] fix:fmt Signed-off-by: Shivam Purohit --- pkg/apis/probe/probe.go | 4 ++-- pkg/apis/probe/types.go | 6 +++--- pkg/cmd/describe/probe.go | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pkg/apis/probe/probe.go b/pkg/apis/probe/probe.go index f942e65..2b1f43e 100644 --- a/pkg/apis/probe/probe.go +++ b/pkg/apis/probe/probe.go @@ -143,8 +143,8 @@ func GetProbeYAMLRequest(pid string, request models.GetProbeYAMLRequest, cred ty return GetProbeYAMLResponse{}, errors.New(getProbeYAMLResponse.Errors[0].Message) } return getProbeYAMLResponse, nil - - } else { + + } else { return GetProbeYAMLResponse{}, errors.New("Unmatched status code:" + string(bodyBytes)) } } diff --git a/pkg/apis/probe/types.go b/pkg/apis/probe/types.go index 1bb17e1..d39bc13 100644 --- a/pkg/apis/probe/types.go +++ b/pkg/apis/probe/types.go @@ -45,8 +45,8 @@ type ListProbeResponseData struct { type GetProbeYAMLGQLRequest struct { Query string `json:"query"` Variables struct { - ProjectID string `json:"projectID"` - Request model.GetProbeYAMLRequest `json:"request"` + ProjectID string `json:"projectID"` + Request model.GetProbeYAMLRequest `json:"request"` } `json:"variables"` } @@ -60,4 +60,4 @@ type GetProbeYAMLResponse struct { type GetProbeYAMLResponseData struct { GetProbeYAML string `json:"getProbeYAML"` -} \ No newline at end of file +} diff --git a/pkg/cmd/describe/probe.go b/pkg/cmd/describe/probe.go index 478fa04..e8e9875 100644 --- a/pkg/cmd/describe/probe.go +++ b/pkg/cmd/describe/probe.go @@ -17,10 +17,9 @@ package describe import ( - "fmt" "os" - + "github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model" apis "github.com/litmuschaos/litmusctl/pkg/apis/probe" "github.com/litmuschaos/litmusctl/pkg/utils" @@ -36,7 +35,7 @@ var probeCmd = &cobra.Command{ credentials, err := utils.GetCredentials(cmd) utils.PrintError(err) - var getProbeYAMLRequest model.GetProbeYAMLRequest + var getProbeYAMLRequest model.GetProbeYAMLRequest pid, err := cmd.Flags().GetString("project-id") utils.PrintError(err) @@ -77,10 +76,9 @@ var probeCmd = &cobra.Command{ os.Exit(1) } utils.PrintInYamlFormat(getProbeYAMLData.Data) - }, + }, } - func init() { DescribeCmd.AddCommand(probeCmd)