Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is done separately as this is quite noisy. This adds labels to each preflight check defining when they should be used. The next commits will then add a filter API making use of these labels. It will then be able to automatically select which checks to use depending on the user system configuration.
- Loading branch information
1 parent
2f3c550
commit 1ef71c9
Showing
9 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package preflight | ||
|
||
type LabelName uint32 | ||
|
||
const ( | ||
Os LabelName = iota | ||
NetworkMode | ||
|
||
// Keep it last | ||
lastLabelName // will be used in OS-specific go files to extend LabelName | ||
) | ||
|
||
type LabelValue uint32 | ||
|
||
const ( | ||
// os | ||
Darwin LabelValue = iota | ||
Linux | ||
Windows | ||
|
||
// network mode | ||
User | ||
System | ||
|
||
// Keep it last | ||
lastLabelValue // will be used in OS-specific go files to extend LabelValue | ||
) | ||
|
||
var ( | ||
None = labels{} | ||
) | ||
|
||
type labels map[LabelName]LabelValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.