diff --git a/.pre-commit b/.pre-commit old mode 100644 new mode 100755 diff --git a/pkg/apis/probe/probe.go b/pkg/apis/probe/probe.go index f4a03d8d..ef873a32 100644 --- a/pkg/apis/probe/probe.go +++ b/pkg/apis/probe/probe.go @@ -1,4 +1,5 @@ package probe + import ( "encoding/json" "errors" @@ -11,7 +12,7 @@ import ( "github.com/litmuschaos/litmusctl/pkg/utils" ) -func GetProbeRequest(pid string, probeID string, cred types.Credentials)(GetProbeResponse, error){ +func GetProbeRequest(pid string, probeID string, cred types.Credentials) (GetProbeResponse, error) { var gqlReq GetProbeGQLRequest gqlReq.Query = GetProbeQuery gqlReq.Variables.ProjectID = pid @@ -56,4 +57,4 @@ func GetProbeRequest(pid string, probeID string, cred types.Credentials)(GetProb return GetProbeResponse{}, errors.New("Unmatched status code:" + string(bodyBytes)) } -} \ No newline at end of file +} diff --git a/pkg/apis/probe/query.go b/pkg/apis/probe/query.go index 030bdecf..8de04132 100644 --- a/pkg/apis/probe/query.go +++ b/pkg/apis/probe/query.go @@ -19,4 +19,4 @@ const ( } } ` -) \ No newline at end of file +) diff --git a/pkg/apis/probe/types.go b/pkg/apis/probe/types.go index f1d23f62..afb263b6 100644 --- a/pkg/apis/probe/types.go +++ b/pkg/apis/probe/types.go @@ -3,7 +3,7 @@ package probe import model "github.com/litmuschaos/litmus/chaoscenter/graphql/server/graph/model" type GetProbeGQLRequest struct { - Query string `json:"query"` + Query string `json:"query"` Variables struct { ProjectID string `json:"projectID"` ProbeName string `json:"probeName"` @@ -20,4 +20,4 @@ type GetProbeResponse struct { type GetProbeResponseData struct { GetProbe model.Probe `json:"getProbe"` -} \ No newline at end of file +} diff --git a/pkg/cmd/get/probe.go b/pkg/cmd/get/probe.go index 7defbdf1..a7347ad6 100644 --- a/pkg/cmd/get/probe.go +++ b/pkg/cmd/get/probe.go @@ -16,12 +16,12 @@ limitations under the License. package get import ( - "os" "fmt" - "time" - "text/tabwriter" + "os" "strconv" "strings" + "text/tabwriter" + "time" apis "github.com/litmuschaos/litmusctl/pkg/apis/probe" "github.com/litmuschaos/litmusctl/pkg/utils" @@ -55,7 +55,7 @@ var probesCmd = &cobra.Command{ probeID, err = cmd.Flags().GetString("probe-id") utils.PrintError(err) - if probeID == ""{ + if probeID == "" { utils.White_B.Print("\nEnter the Probe ID: ") fmt.Scanln(&probeID) @@ -88,7 +88,7 @@ var probesCmd = &cobra.Command{ utils.White.Fprintln(writer, "PROBE NAME\t", probesData.Name) utils.White.Fprintln(writer, "PROBE DESCRIPTION \t", description) utils.White.Fprintln(writer, "PROBE TYPE \t", probesData.Type) - utils.White.Fprintln(writer, "PROBE INFRASTRUCTURE TYPE \t", probesData.InfrastructureType) + utils.White.Fprintln(writer, "PROBE INFRASTRUCTURE TYPE \t", probesData.InfrastructureType) utils.White.Fprintln(writer, "CREATED AT\t", createdTime) utils.White.Fprintln(writer, "CREATED BY\t", probesData.CreatedBy.Username) utils.White.Fprintln(writer, "UPDATED AT\t", updatedTime)