Ver Fonte

Merge pull request #1038 from kubecost/mmd/update-codecs-backwards-compat

Regenerate codecs with backwards-compat support
Michael Dresser há 4 anos atrás
pai
commit
9d9af5583c
2 ficheiros alterados com 674 adições e 419 exclusões
  1. 20 0
      pkg/kubecost/bingen.go
  2. 654 419
      pkg/kubecost/kubecost_codecs.go

+ 20 - 0
pkg/kubecost/bingen.go

@@ -1,5 +1,25 @@
 package kubecost
 
+////////////////////////////////////////////////////////////////////////////////
+// NOTE: If you add fields to _any_ struct that is serialized by bingen, please
+// make sure to add those fields to the END of the struct definition. This is
+// required for backwards-compatibility. So:
+//
+// type Foo struct {
+//     ExistingField1 string
+//     ExistingField2 int
+// }
+//
+// becomes:
+//
+// type Foo struct {
+//     ExistingField1 string
+//     ExistingField2 int
+//     NewField       float64 // @bingen: <- annotation ref: bingen README
+// }
+//
+////////////////////////////////////////////////////////////////////////////////
+
 // Default Version Set (uses -version flag passed) includes shared resources
 // @bingen:generate:Window
 

Diff do ficheiro suprimidas por serem muito extensas
+ 654 - 419
pkg/kubecost/kubecost_codecs.go


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff