platforms

package
v1.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spec

type Spec struct {
	OS   string
	Arch string
}

Spec defines a platform as an os/arch pair.

func (*Spec) IsCompatibleWith

func (s *Spec) IsCompatibleWith(otherSpec Spec) bool

IsCompatibleWith returns true if the current spec is compatible with the spec specified as its argument. TTPs will often not care about the architecture and will therefore specify requirements like:

platforms:
  - os: windows

In such cases, we can assume that the TTP is compatible with all architectures.

func (*Spec) String

func (s *Spec) String() string

String returns a human readable representation of the spec; it is mainly used for error messages.

func (*Spec) Validate

func (s *Spec) Validate() error

Validate checks whether the platform spec is valid. To be valid, the spec must be enforceable, so at least one of the fields must be non-empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL