Skip to content

Commit

Permalink
fix:fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Purohit <shivampurohit900@gmail.com>
  • Loading branch information
shivam-Purohit committed Mar 21, 2024
1 parent 01738a6 commit c40e176
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/probe/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
6 changes: 3 additions & 3 deletions pkg/apis/probe/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand All @@ -60,4 +60,4 @@ type GetProbeYAMLResponse struct {

type GetProbeYAMLResponseData struct {
GetProbeYAML string `json:"getProbeYAML"`
}
}
8 changes: 3 additions & 5 deletions pkg/cmd/describe/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down Expand Up @@ -77,10 +76,9 @@ var probeCmd = &cobra.Command{
os.Exit(1)
}
utils.PrintInYamlFormat(getProbeYAMLData.Data)
},
},
}


func init() {
DescribeCmd.AddCommand(probeCmd)

Expand Down

0 comments on commit c40e176

Please sign in to comment.