Make unnecessary hpa public funcs private

Previously
`pkg.controller.podautoscaler.UnsafeConvertToVersion` was
exported. However, it was never used outside of the `podautoscaler`
package. Make it private to prevent confusion.

Additionally, move the two private functions in `horizontal.go` to be
with the other private functions at the bottom of the file - imho its
more readable than having them directly at the top of the file, before
the public type and function definitions.
This commit is contained in:
mattjmcnaughton
2017-09-25 09:43:04 -04:00
parent 46c2bfe47d
commit dd5be2a882
3 changed files with 26 additions and 26 deletions

View File

@@ -232,7 +232,7 @@ func (tc *testCase) prepareTestClient(t *testing.T) (*fake.Clientset, *metricsfa
}
// and... convert to autoscaling v1 to return the right type
objv1, err := UnsafeConvertToVersionVia(obj, autoscalingv1.SchemeGroupVersion)
objv1, err := unsafeConvertToVersionVia(obj, autoscalingv1.SchemeGroupVersion)
if err != nil {
return true, nil, err
}