Skip to content

Commit

Permalink
refactor(plc4go/spi): cleanup unused types
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed May 17, 2023
1 parent 1f16e0f commit 794183a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 150 deletions.
45 changes: 0 additions & 45 deletions plc4go/spi/model/DefaultPlcSubscriptionRequestResult.go

This file was deleted.

101 changes: 0 additions & 101 deletions plc4go/spi/model/DefaultPlcSubscriptionRequestResult_plc4xgen.go

This file was deleted.

7 changes: 4 additions & 3 deletions plc4go/spi/model/DefaultPlcTagRequest.go
Expand Up @@ -42,8 +42,9 @@ func (d *DefaultPlcTagRequest) GetTagNames() []string {
}

func (d *DefaultPlcTagRequest) GetTag(name string) apiModel.PlcTag {
if tag, ok := d.tags[name]; ok {
return tag
tag, ok := d.tags[name]
if !ok {
return nil
}
return nil
return tag
}
1 change: 1 addition & 0 deletions plc4go/spi/model/DefaultPlcWriteRequest.go
Expand Up @@ -194,5 +194,6 @@ func (d *DefaultPlcWriteRequest) GetWriteRequestInterceptor() interceptors.Write
}

func (d *DefaultPlcWriteRequest) GetValue(name string) apiValues.PlcValue {
// TODO: guard
return d.values[name]
}
1 change: 1 addition & 0 deletions plc4go/spi/model/DefaultPlcWriteResponse.go
Expand Up @@ -60,5 +60,6 @@ func (d *DefaultPlcWriteResponse) GetRequest() apiModel.PlcWriteRequest {
}

func (d *DefaultPlcWriteResponse) GetResponseCode(name string) apiModel.PlcResponseCode {
// TODO: guard
return d.responseCodes[name]
}
1 change: 0 additions & 1 deletion plc4go/spi/model/render_test.go
Expand Up @@ -55,7 +55,6 @@ func TestRenderTest(t *testing.T) {
&DefaultPlcSubscriptionEventItem{},
&DefaultPlcSubscriptionHandle{},
&DefaultPlcSubscriptionRequest{DefaultPlcTagRequest: NewDefaultPlcTagRequest(nil, nil)},
&DefaultPlcSubscriptionRequestResult{},
&DefaultPlcSubscriptionResponse{},
&DefaultPlcSubscriptionResponseItem{},
&DefaultPlcTagRequest{},
Expand Down

0 comments on commit 794183a

Please sign in to comment.