Skip to content

Commit ca319de

Browse files
committed
Add comments with version info
1 parent 61fe2c4 commit ca319de

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

specs-go/config.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type Spec struct {
1010
Version string `json:"cdiVersion"`
1111
Kind string `json:"kind"`
1212
// Annotations add meta information per CDI spec. Note these are CDI-specific and do not affect container metadata.
13+
// Added in v0.6.0.
1314
Annotations map[string]string `json:"annotations,omitempty"`
1415
Devices []Device `json:"devices"`
1516
ContainerEdits ContainerEdits `json:"containerEdits,omitempty"`
@@ -19,6 +20,7 @@ type Spec struct {
1920
type Device struct {
2021
Name string `json:"name"`
2122
// Annotations add meta information per device. Note these are CDI-specific and do not affect container metadata.
23+
// Added in v0.6.0.
2224
Annotations map[string]string `json:"annotations,omitempty"`
2325
ContainerEdits ContainerEdits `json:"containerEdits"`
2426
}
@@ -29,14 +31,14 @@ type ContainerEdits struct {
2931
DeviceNodes []*DeviceNode `json:"deviceNodes,omitempty"`
3032
Hooks []*Hook `json:"hooks,omitempty"`
3133
Mounts []*Mount `json:"mounts,omitempty"`
32-
IntelRdt *IntelRdt `json:"intelRdt,omitempty"`
33-
AdditionalGIDs []uint32 `json:"additionalGids,omitempty"`
34+
IntelRdt *IntelRdt `json:"intelRdt,omitempty"` // Added in v0.7.0
35+
AdditionalGIDs []uint32 `json:"additionalGids,omitempty"` // Added in v0.7.0
3436
}
3537

3638
// DeviceNode represents a device node that needs to be added to the OCI spec.
3739
type DeviceNode struct {
3840
Path string `json:"path"`
39-
HostPath string `json:"hostPath,omitempty"`
41+
HostPath string `json:"hostPath,omitempty"` // Added in v0.5.0
4042
Type string `json:"type,omitempty"`
4143
Major int64 `json:"major,omitempty"`
4244
Minor int64 `json:"minor,omitempty"`
@@ -51,7 +53,7 @@ type Mount struct {
5153
HostPath string `json:"hostPath"`
5254
ContainerPath string `json:"containerPath"`
5355
Options []string `json:"options,omitempty"`
54-
Type string `json:"type,omitempty"`
56+
Type string `json:"type,omitempty"` // Added in v0.4.0
5557
}
5658

5759
// Hook represents a hook that needs to be added to the OCI spec.

0 commit comments

Comments
 (0)