Skip to content

Commit

Permalink
Added no lint comments
Browse files Browse the repository at this point in the history
Author: Chaitanyareddy0702 [email protected]
Signed-off-by: vchinda <[email protected]>
Signed-off-by: GW Cloud Common Services <[email protected]>
  • Loading branch information
vchinda authored and GW Cloud Common Services committed Jul 10, 2024
1 parent f5ca25d commit 12c79af
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pkg/backup/sls/producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (callback *Callback) Fail(result *producer.Result) {
}

// Success is success callback
func (callback *Callback) Success(result *producer.Result) {
func (callback *Callback) Success(result *producer.Result) { //nolint:golint,unused
}

// Store is store workflowRun to sls
Expand Down
2 changes: 1 addition & 1 deletion pkg/hooks/data_passing.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func Output(ctx wfContext.Context, taskValue *value.Value, step v1alpha1.Workflo
}

// SetAdditionalNameInStatus sets additional name from properties to status map
func SetAdditionalNameInStatus(stepStatus map[string]v1alpha1.StepStatus, name string, properties *runtime.RawExtension, status v1alpha1.StepStatus) {
func SetAdditionalNameInStatus(stepStatus map[string]v1alpha1.StepStatus, name string, properties *runtime.RawExtension, status v1alpha1.StepStatus) { //nolint:golint,unused
if stepStatus == nil || properties == nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/email/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type content struct {
var emailRoutine sync.Map

// Send sends email
func (h *provider) Send(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) Send(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
stepID, err := v.LookupValue("stepID")
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions pkg/providers/metrics/prom_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
type provider struct{}

// PromCheck do health check from metrics from prometheus
func (h *provider) PromCheck(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) PromCheck(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
stepID, err := v.GetString("stepID")
if err != nil {
return err
Expand Down Expand Up @@ -175,7 +175,7 @@ func getQueryResult(ctx monitorContext.Context, v *value.Value) (string, error)
return valueStr, nil
}

func compareValueWithCondition(valueStr string, conditionStr string, v *value.Value) (bool, error) {
func compareValueWithCondition(valueStr string, conditionStr string, v *value.Value) (bool, error) { //nolint:golint,unused
template := fmt.Sprintf("if: %s %s", valueStr, conditionStr)
cueValue, err := value.NewValue(template, nil, "")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type provider struct {
pCtx process.Context
}

func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (p *provider) PatchK8sObject(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
val, err := v.LookupValue("value")
if err != nil {
return err
Expand Down
12 changes: 6 additions & 6 deletions pkg/providers/workspace/workspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type provider struct {
}

// DoVar get & put variable from context.
func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
methodV, err := v.Field("method")
if err != nil {
return err
Expand Down Expand Up @@ -87,7 +87,7 @@ func (h *provider) DoVar(ctx monitorContext.Context, wfCtx wfContext.Context, v
}

// Wait let workflow wait.
func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
cv := v.CueValue()
if cv.Exists() {
ret := cv.LookupPath(value.FieldPath("continue"))
Expand All @@ -104,7 +104,7 @@ func (h *provider) Wait(ctx monitorContext.Context, wfCtx wfContext.Context, v *
}

// Break let workflow terminate.
func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
var msg string
if v != nil {
msg, _ = v.GetString("message")
Expand All @@ -114,7 +114,7 @@ func (h *provider) Break(ctx monitorContext.Context, wfCtx wfContext.Context, v
}

// Fail let the step fail, its status is failed and reason is Action
func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
var msg string
if v != nil {
msg, _ = v.GetString("message")
Expand All @@ -124,7 +124,7 @@ func (h *provider) Fail(ctx monitorContext.Context, wfCtx wfContext.Context, v *
}

// Suspend let the step suspend, its status is suspending and reason is Suspend
func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
stepID := fmt.Sprint(h.pCtx.GetData(model.ContextStepSessionID))
timestamp := wfCtx.GetMutableValue(stepID, ResumeTimeStamp)
var msg string
Expand Down Expand Up @@ -173,7 +173,7 @@ func (h *provider) Suspend(ctx monitorContext.Context, wfCtx wfContext.Context,
}

// Message writes message to step status, note that the message will be overwritten by the next message.
func (h *provider) Message(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error {
func (h *provider) Message(ctx monitorContext.Context, wfCtx wfContext.Context, v *value.Value, act types.Action) error { //nolint:golint,unused
var msg string
if v != nil {
msg, _ = v.GetString("message")
Expand Down

0 comments on commit 12c79af

Please sign in to comment.