Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Chubatiuk committed Nov 21, 2023
1 parent 1c4c7ab commit d71adce
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
3 changes: 1 addition & 2 deletions eventbus/kafka/sensor/trigger_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ func (c *KafkaTriggerConnection) OneAndDone() bool {
}

func hasNoAndOp(node ast.Node) bool {
switch n := node.(type) {
case *ast.BinaryNode:
if n, ok := node.(*ast.BinaryNode); ok {
if n.Operator == "&&" || n.Operator == "and" {
return false
} else {
Expand Down
15 changes: 0 additions & 15 deletions eventbus/stan/sensor/trigger_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,18 +452,3 @@ func (mh *eventSourceMessageHolder) isCleanedUp() bool {
}
return len(mh.msgs) == 0
}

func unique(stringSlice []string) []string {
if len(stringSlice) == 0 {
return stringSlice
}
keys := make(map[string]bool)
list := []string{}
for _, entry := range stringSlice {
if _, value := keys[entry]; !value {
keys[entry] = true
list = append(list, entry)
}
}
return list
}
15 changes: 0 additions & 15 deletions sensors/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,18 +458,3 @@ func convertEvent(event cloudevents.Event) *v1alpha1.Event {
Data: event.Data(),
}
}

func unique(stringSlice []string) []string {
if len(stringSlice) == 0 {
return stringSlice
}
keys := make(map[string]bool)
list := []string{}
for _, entry := range stringSlice {
if _, value := keys[entry]; !value {
keys[entry] = true
list = append(list, entry)
}
}
return list
}

0 comments on commit d71adce

Please sign in to comment.