Skip to content

Commit

Permalink
EDX-4721 Remove unused variables and function to fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Ginny Guan <ginny@iotechsys.com>
  • Loading branch information
jinlinGuan committed Feb 26, 2024
1 parent c3310a1 commit eb5ed9a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
9 changes: 0 additions & 9 deletions clients/http/utils/central.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ import (
"github.com/edgexfoundry/go-mod-core-contracts/v3/errors"
)

// edgeXClientReqURI returns the non-encoded path?query that would be used in an HTTP request for u.
func edgeXClientReqURI(u *url.URL) string {
result := u.Scheme + "://" + u.Host + u.Path
if u.ForceQuery || u.RawQuery != "" {
result += "?" + u.RawQuery
}
return result
}

// CentralGetRequest makes the get request and return the body
func CentralGetRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string, requestParams url.Values, authInjector interfaces.AuthenticationInjector) errors.EdgeX {
req, edgexErr := createRequest(ctx, http.MethodGet, baseUrl, requestPath, requestParams)
Expand Down
4 changes: 0 additions & 4 deletions dtos/requests/provisionwatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ var testIdentifiers = map[string]string{
var testBlockingIdentifiers = map[string][]string{
"port": {"397", "398", "399"},
}
var testDeviceDescription = "test device description"
var testDeviceNamePattern = "device-name-{{Address}}-{{Port}}"
var testProfileNamePattern = "profile-name-{{Address}}-{{Port}}"
var testProfileDescription = "test profile description"
var testAddProvisionWatcher = AddProvisionWatcherRequest{
BaseRequest: common.BaseRequest{
RequestId: ExampleUUID,
Expand Down
2 changes: 1 addition & 1 deletion xrtmodels/deviceInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ToEdgeXV2Device(device DeviceInfo, serviceName string) v2models.Device {

// ToEdgeXV3Device converts the XRT model to EdgeX v3 model
func ToEdgeXV3Device(device DeviceInfo, serviceName string) models.Device {
for protocol, _ := range device.Protocols {
for protocol := range device.Protocols {
device.Properties[common.ProtocolName] = strings.ToLower(protocol)
}
return models.Device{
Expand Down

0 comments on commit eb5ed9a

Please sign in to comment.