Refactor and Better Document protocolIntegers() and protocolStrings() Usage #6302
Labels
service/ec2
Issues and PRs that pertain to the ec2 service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
technical-debt
Addresses areas of the codebase that need refactoring or redesign.
Description
The
protocolIntegers()
function is used to return amap[string]int
of IANA protocol keywords to protocol numbers, while theprotocolStrings()
function is used to return the opposite (map[int]string
) of the same information.The usage of these functions is a little awkward and sometimes saved into a nondescript
p
variable, e.g.p, ok = protocolIntegers()[protocol]
We should consider:
References
The text was updated successfully, but these errors were encountered: