Raise the golinter bar.

This commit is contained in:
Jeffrey Regan
2019-11-14 13:49:49 -08:00
parent 2fa944b1cd
commit 75b8103215
42 changed files with 153 additions and 254 deletions

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func writeMediumBase(th *kusttest_test.KustTestHarness) {

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
// Here is a structure of a kustomization of two components, component1

View File

@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
const httpsService = `

View File

@@ -1,25 +1,12 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
// Generate a Secret and a ConfigMap from the same data

View File

@@ -1,25 +1,12 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func writeBaseWithCrd(th *kusttest_test.KustTestHarness) {

View File

@@ -1,25 +1,12 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func makeBaseReferencingCustomConfig(th *kusttest_test.KustTestHarness) {

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
// Demo custom configuration of a builtin transformation.

View File

@@ -9,7 +9,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
const patchAddProbe = `

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
// Here's a structure of two kustomizations,

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func makeCommonFileForExtendedPatchTest(th *kusttest_test.KustTestHarness) {

View File

@@ -1,18 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
@@ -20,7 +7,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestSimpleBase(t *testing.T) {

View File

@@ -1,25 +1,12 @@
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestSecretGenerator(t *testing.T) {

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func makeResourcesForPatchTest(th *kusttest_test.KustTestHarness) {

View File

@@ -1,18 +1,5 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
@@ -20,7 +7,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func makeCommonFileForMultiplePatchTest(th *kusttest_test.KustTestHarness) {

View File

@@ -1,25 +1,12 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestNamespacedGenerator(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestNamespacedSecrets(t *testing.T) {

View File

@@ -1,25 +1,12 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestNullValues(t *testing.T) {

View File

@@ -1,25 +1,12 @@
/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestPruneConfigMap(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func writeBase(th *kusttest_test.KustTestHarness) {

View File

@@ -6,7 +6,7 @@ package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func makeStatefulSetKustomization(th *kusttest_test.KustTestHarness) {

View File

@@ -1,25 +1,12 @@
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Copyright 2019 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package target_test
import (
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func makeTransfomersImageBase(th *kusttest_test.KustTestHarness) {

View File

@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"sigs.k8s.io/kustomize/api/testutils/kusttest"
kusttest_test "sigs.k8s.io/kustomize/api/testutils/kusttest"
)
func TestBasicVariableRef(t *testing.T) {