-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow empty "static_route" Set #105
Allow empty "static_route" Set #105
Conversation
Hi @zuzzas ! Thank you for PR! Please add record to CHANGELOG. |
yandex/structures.go
Outdated
} | ||
|
||
if v, ok := res["next_hop_address"].(string); ok { | ||
sr.NextHop = &vpc.StaticRoute_NextHopAddress{ | ||
NextHopAddress: v, | ||
} | ||
} else { | ||
return nil, errors.New("\"static_route\" should have a \"next_hop_address\" field") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single quotes for field names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
850383b
to
e0fe4a6
Compare
Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
e0fe4a6
to
6625dc6
Compare
@GennadySpb |
@zuzzas merged! I'm sorry for the delay. |
The "static_route" block is marked as optional. Unfortunately, a function that converts a set into a gRPC struct is not aware of that fact.