Conversation
# Conflicts: # sdk/instance/helpers.go
NicolasMahe
commented
Jun 25, 2019
krhubert
reviewed
Jun 25, 2019
| // FromProtoService converts a the protobuf definition to the internal service struct | ||
| // TODO: should not be public. Need to move server/grpc/service.go to server/grpc/api/service.go | ||
| func FromProtoService(s *definition.Service) (*service.Service, error) { | ||
| if s == nil { |
Contributor
There was a problem hiding this comment.
Do not check for nil, as it only hides some real issue with nil pointers. It should just do conversion without returning an error.
Member
Author
There was a problem hiding this comment.
This check should exist somewhere. I guess it could be move in the service.Create api function to keep the mapping simple 👍
| @@ -175,7 +182,7 @@ func toProtoParameters(params []*service.Parameter) []*definition.Parameter { | |||
|
|
|||
| func toProtoConfiguration(configuration *service.Dependency) *definition.Configuration { | |||
| if configuration == nil { | |||
Contributor
There was a problem hiding this comment.
same here I guess, it shouldn't' check for nil, as this function is for mapping, not nic catching :)
Member
Author
There was a problem hiding this comment.
Same answer, this have to be managed somewhere but i agree that it's not the best place here.
# Conflicts: # server/grpc/api/mapping.go
NicolasMahe
commented
Jun 25, 2019
krhubert
approved these changes
Jun 25, 2019
antho1404
approved these changes
Jun 25, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #1097