Commit 77b7685c authored by Amos Wenger's avatar Amos Wenger

Introduce 'Runtimes' type, with 'HasPlatform'

parent 1e1b8248
Pipeline #14548 passed with stage
in 14 seconds
......@@ -6,3 +6,5 @@ require (
github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb
)
go 1.13
......@@ -24,6 +24,17 @@ type Runtime struct {
Is64 bool `json:"is64"`
}
type Runtimes []*Runtime
func (rs Runtimes) HasPlatform(platform Platform) bool {
for _, r := range rs {
if r.Platform == platform {
return true
}
}
return false
}
func (r *Runtime) String() string {
var arch string
if r.Is64 {
......
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