From 31d310a4b1441fb383d4e1cf1ce6d5b17b4c07b5 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 19 May 2022 10:45:28 +0200 Subject: linter: enable unconvert linter Detects unneccessary type conversions and helps in keeping the code base cleaner. Signed-off-by: Valentin Rothberg --- cmd/podman/common/create_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd/podman/common') diff --git a/cmd/podman/common/create_test.go b/cmd/podman/common/create_test.go index ab41f81ad..80e6cbf54 100644 --- a/cmd/podman/common/create_test.go +++ b/cmd/podman/common/create_test.go @@ -28,8 +28,8 @@ func TestPodOptions(t *testing.T) { for j := 0; j < cc.NumField(); j++ { containerField := cc.FieldByIndex([]int{j}) containerType := reflect.TypeOf(exampleOptions).Field(j) - tagPod := strings.Split(string(podType.Tag.Get("json")), ",")[0] - tagContainer := strings.Split(string(containerType.Tag.Get("json")), ",")[0] + tagPod := strings.Split(podType.Tag.Get("json"), ",")[0] + tagContainer := strings.Split(containerType.Tag.Get("json"), ",")[0] if tagPod == tagContainer && (tagPod != "" && tagContainer != "") { areEqual := true if containerField.Kind() == podField.Kind() { -- cgit v1.2.3-54-g00ecf