Skip to content

Commit

Permalink
fix:gofmt
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Purohit <[email protected]>
  • Loading branch information
shivam-Purohit committed Mar 3, 2024
1 parent 5656c8e commit b87fc6f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Empty file modified .pre-commit
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions pkg/apis/probe/probe.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package probe

import (
"encoding/json"
"errors"
Expand All @@ -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
Expand Down Expand Up @@ -56,4 +57,4 @@ func GetProbeRequest(pid string, probeID string, cred types.Credentials)(GetProb
return GetProbeResponse{}, errors.New("Unmatched status code:" + string(bodyBytes))
}

}
}
2 changes: 1 addition & 1 deletion pkg/apis/probe/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ const (
}
}
`
)
)
4 changes: 2 additions & 2 deletions pkg/apis/probe/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -20,4 +20,4 @@ type GetProbeResponse struct {

type GetProbeResponseData struct {
GetProbe model.Probe `json:"getProbe"`
}
}
10 changes: 5 additions & 5 deletions pkg/cmd/get/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b87fc6f

Please sign in to comment.