Skip to content

Commit

Permalink
Remove unused variables and unreachable code (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
navidshaikh authored Apr 6, 2020
1 parent a7ec520 commit 8a60d2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/eventing/v1alpha1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewKnEventingClient(client client_v1alpha1.EventingV1alpha1Interface, names

//CreateTrigger is used to create an instance of trigger
func (c *knEventingClient) CreateTrigger(trigger *v1alpha1.Trigger) error {
trigger, err := c.client.Triggers(c.namespace).Create(trigger)
_, err := c.client.Triggers(c.namespace).Create(trigger)
if err != nil {
return kn_errors.GetError(err)
}
Expand Down Expand Up @@ -112,7 +112,7 @@ func (c *knEventingClient) ListTriggers() (*v1alpha1.TriggerList, error) {

//CreateTrigger is used to create an instance of trigger
func (c *knEventingClient) UpdateTrigger(trigger *v1alpha1.Trigger) error {
trigger, err := c.client.Triggers(c.namespace).Update(trigger)
_, err := c.client.Triggers(c.namespace).Update(trigger)
if err != nil {
return kn_errors.GetError(err)
}
Expand Down
1 change: 0 additions & 1 deletion pkg/kn/commands/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ func sortConditions(conditions []apis.Condition) []apis.Condition {
default:
return false
}
return false
})
return ret
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/sources/v1alpha2/binding_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func newKnSinkBindingClient(client clientv1alpha2.SinkBindingInterface, namespac

//CreateSinkBinding is used to create an instance of binding
func (c *knBindingClient) CreateSinkBinding(binding *v1alpha2.SinkBinding) error {
binding, err := c.client.Create(binding)
_, err := c.client.Create(binding)
if err != nil {
return knerrors.GetError(err)
}
Expand Down Expand Up @@ -116,7 +116,7 @@ func (c *knBindingClient) ListSinkBindings() (*v1alpha2.SinkBindingList, error)

//CreateSinkBinding is used to create an instance of binding
func (c *knBindingClient) UpdateSinkBinding(binding *v1alpha2.SinkBinding) error {
binding, err := c.client.Update(binding)
_, err := c.client.Update(binding)
if err != nil {
return knerrors.GetError(err)
}
Expand Down

0 comments on commit 8a60d2e

Please sign in to comment.