k3s/pkg/kubecfg
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
..
doc.go Rename cloudcfg to kubecfg 2014-06-25 18:01:37 -07:00
kubecfg.go Shorten kubecfg test by adding private variable for duration 2015-01-09 13:16:30 -05:00
kubecfg_test.go Shorten kubecfg test by adding private variable for duration 2015-01-09 13:16:30 -05:00
parse.go Allow server and client to take api version as argument 2014-09-18 23:27:28 -04:00
parse_test.go Factor out API defaulting from validation logic 2015-02-03 00:55:42 -08:00
proxy_server.go Replace custom proxy with httputil.ReverseProxy for kubecfg/kubectl. 2014-10-21 18:52:18 +01:00
proxy_server_test.go Replace custom proxy with httputil.ReverseProxy for kubecfg/kubectl. 2014-10-21 18:52:18 +01:00
resource_printer.go Remove CONDITION from event object completely 2015-01-14 14:17:16 -08:00
resource_printer_test.go Factor out API defaulting from validation logic 2015-02-03 00:55:42 -08:00
validate.go Update references from Path() to the appropriate segment use 2014-12-29 15:38:52 -05:00