From c63e62b58e791fb2fdbc048182674ee9b2a4b152 Mon Sep 17 00:00:00 2001 From: austin Date: Fri, 11 May 2018 16:40:22 -0700 Subject: Corrects location of core defaults.go based on current kubernetes/kubernetes repo. --- contributors/devel/api_changes.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/contributors/devel/api_changes.md b/contributors/devel/api_changes.md index 2440902e..3c457f25 100644 --- a/contributors/devel/api_changes.md +++ b/contributors/devel/api_changes.md @@ -365,10 +365,14 @@ being required otherwise. ### Edit defaults.go If your change includes new fields for which you will need default values, you -need to add cases to `pkg/apis///defaults.go` (the core v1 API -is special, its defaults.go is at `pkg/api/v1/defaults.go`. For simplicity, we -will not mention this special case in the rest of the article). Of course, since -you have added code, you have to add a test: +need to add cases to `pkg/apis///defaults.go` + +*Note:* In the past the core v1 API +was special. Its `defaults.go` used to live at `pkg/api/v1/defaults.go`. +If you see code referencing that path, you can be sure its outdated. Now the core v1 api lives at +`pkg/apis/core/v1/defaults.go` which follows the above convention. + +Of course, since you have added code, you have to add a test: `pkg/apis///defaults_test.go`. Do use pointers to scalars when you need to distinguish between an unset value -- cgit v1.2.3