Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
container: Prevent potential panic of version getter
Previously, `Container.Version` method threw panic when being called on any instance which had not been protocol-decoded. While this was not a big problem because this field does not bring any practical benefit, in general it could generate unsafe code. For example, when the caller does not know how exactly the accepted instance is created. Now method returns zero version if underlying protocol field is unset. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
- Loading branch information