Rename a bunch of "Make" functions to "New"

Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
This commit is contained in:
Tim Hockin
2014-08-20 21:27:19 -07:00
parent 953cd923f1
commit 0f97a73c1b
33 changed files with 217 additions and 217 deletions

View File

@@ -28,7 +28,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)
func makePodList(count int) api.PodList {
func newPodList(count int) api.PodList {
pods := []api.Pod{}
for i := 0; i < count; i++ {
pods = append(pods, api.Pod{
@@ -122,7 +122,7 @@ func TestFindPort(t *testing.T) {
}
func TestSyncEndpointsEmpty(t *testing.T) {
body, _ := json.Marshal(makePodList(0))
body, _ := json.Marshal(newPodList(0))
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),
@@ -139,7 +139,7 @@ func TestSyncEndpointsEmpty(t *testing.T) {
}
func TestSyncEndpointsError(t *testing.T) {
body, _ := json.Marshal(makePodList(0))
body, _ := json.Marshal(newPodList(0))
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),
@@ -157,7 +157,7 @@ func TestSyncEndpointsError(t *testing.T) {
}
func TestSyncEndpointsItems(t *testing.T) {
body, _ := json.Marshal(makePodList(1))
body, _ := json.Marshal(newPodList(1))
fakeHandler := util.FakeHandler{
StatusCode: 200,
ResponseBody: string(body),