Code Review
/
nonrtric
/
plt
/
sme.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Rename APIRegister to PublishRegister
[nonrtric/plt/sme.git]
/
capifcore
/
internal
/
discoverservice
/
discoverservice.go
diff --git
a/capifcore/internal/discoverservice/discoverservice.go
b/capifcore/internal/discoverservice/discoverservice.go
index
797eaa7
..
4ab8a92
100644
(file)
--- a/
capifcore/internal/discoverservice/discoverservice.go
+++ b/
capifcore/internal/discoverservice/discoverservice.go
@@
-141,18
+141,12
@@
func checkVersion(version publishapi.Version, wantedVersion *string, commType *p
}
func checkCommType(resources *[]publishapi.Resource, commType *publishapi.CommunicationType) bool {
}
func checkCommType(resources *[]publishapi.Resource, commType *publishapi.CommunicationType) bool {
- match := false
- if commType != nil {
- for _, resource := range *resources {
- if resource.CommType == *commType {
- match = true
- break
- }
+ for _, resource := range *resources {
+ if resource.CommType == *commType {
+ return true
}
}
- } else {
- match = true
}
}
- return
match
+ return
false
}
// This function wraps sending of an error in the Error format, and
}
// This function wraps sending of an error in the Error format, and