Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions dto/v2/body/gpu_claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ func (g GenericDeviceConfiguration) DriverName() string {
func (g GenericDeviceConfiguration) MarshalJSON() ([]byte, error) {
type genericAlias GenericDeviceConfiguration
return json.Marshal(&struct {
Type string `json:"type" bson:"type"`
Alias genericAlias `json:",inline" bson:",inline"`
Type string `json:"type" bson:"type"`
genericAlias
}{
Type: "generic",
Alias: (genericAlias)(g),
Type: "generic",
genericAlias: (genericAlias)(g),
})
}

Expand All @@ -211,11 +211,11 @@ func (NvidiaDeviceConfiguration) DriverName() string {
func (n NvidiaDeviceConfiguration) MarshalJSON() ([]byte, error) {
type nvidiaAlias NvidiaDeviceConfiguration
return json.Marshal(&struct {
Type string `json:"type" bson:"type"`
Alias nvidiaAlias `json:",inline" bson:",inline"`
Type string `json:"type" bson:"type"`
nvidiaAlias
}{
Type: "nvidia",
Alias: (nvidiaAlias)(n),
Type: "nvidia",
nvidiaAlias: (nvidiaAlias)(n),
})
}

Expand Down