k3s/pkg/watch/json
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08:00
..
decoder.go fix missing error type in watch decode 2014-10-13 15:03:17 -07:00
decoder_test.go Factor out API defaulting from validation logic 2015-02-03 00:55:42 -08:00
doc.go Cleanup watch encoding (remove dupe Encoding) 2014-09-22 16:03:07 -04:00
encoder.go Cleanup watch encoding (remove dupe Encoding) 2014-09-22 16:03:07 -04:00
encoder_test.go Factor out API defaulting from validation logic 2015-02-03 00:55:42 -08:00
types.go Remove unused YAML tags and GetYAML/SetYAML methods 2014-12-02 16:25:28 -08:00