11// Copyright (c) Mondoo, Inc.
22// SPDX-License-Identifier: BUSL-1.1
33
4+ // Generate a go source file with feature-flags and helper vars.
5+ //
6+ // You configure feature-flags in YAML. Here is an example:
7+ //
8+ // - desc: Allows MQL to use variable references across blocks. Fully changes the compiled code.
9+ // end: v7.0
10+ // id: PiperCode
11+ // start: v5.x
12+ // status: default
13+ // idx: 2 # optional, will be generated
14+ //
15+ // Status can be:
16+ // - builtin: features that are completed and have been built into the code, but shouldn't be used (or set) anymore
17+ // - sunset: features that are completed but have not been built into the code, please don't use them anymore
18+ // - new: features that are now available to be used and aren't active by default
19+ // - default: features that are available and turned on by default (you can still turn them off)
20+ // - unknown: try not to have any unknown features, we don't know what's going on with these but don't use them
21+
422package main
523
624import (
@@ -18,17 +36,11 @@ type (
1836 Features []* feature
1937 }
2038 feature struct {
21- Id string `json:"id"`
22- Idx int `json:"idx"`
23- Start string `json:"start"`
24- End string `json:"end,omitempty"`
25- Desc string `json:"desc"`
26- // Status can be:
27- // - builtin: features that are completed and have been built into the code, but shouldn't be used (or set) anymore
28- // - sunset: features that are completed but have not been built into the code, please don't use them anymore
29- // - new: features that are now available to be used and aren't active by default
30- // - default: features that are available and turned on by default (you can still turn them off)
31- // - unknown: try not to have any unknown features, we don't know what's going on with these but don't use them
39+ Id string `json:"id"`
40+ Idx int `json:"idx"`
41+ Start string `json:"start"`
42+ End string `json:"end,omitempty"`
43+ Desc string `json:"desc"`
3244 Status string `json:"status,omitempty"`
3345 }
3446)
0 commit comments