Commit 18ef40c7 authored by Cristian Maglie's avatar Cristian Maglie

Fix PlatformReference.String() method nil-pointer error

parent aaa0ce95
......@@ -33,7 +33,11 @@ type PlatformReference struct {
}
func (platform *PlatformReference) String() string {
return platform.Package + ":" + platform.PlatformArchitecture + "@" + platform.PlatformVersion.String()
res := platform.Package + ":" + platform.PlatformArchitecture
if platform.PlatformVersion != nil {
return res + "@" + platform.PlatformVersion.String()
}
return res
}
// FindPlatform returns the Platform matching the PlatformReference or nil if not found.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment