From 582489f5d5f51c3984867427e819b9c95a61f824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Caama=C3=B1o=20Ruiz?= Date: Thu, 2 Jun 2022 00:04:41 +0000 Subject: [PATCH] update golangci-lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaime CaamaƱo Ruiz --- .github/workflows/ci.yml | 2 +- ovsdb/schema.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e7d919e..6ff26c82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.40.1 + version: v1.46.2 skip-go-installation: true skip-pkg-cache: true skip-build-cache: true diff --git a/ovsdb/schema.go b/ovsdb/schema.go index 30ecb1b4..cf80aa50 100644 --- a/ovsdb/schema.go +++ b/ovsdb/schema.go @@ -321,9 +321,7 @@ func (b *BaseType) UnmarshalJSON(data []byte) error { oSet := bt.Enum.([]interface{}) innerSet := oSet[1].([]interface{}) b.Enum = make([]interface{}, len(innerSet)) - for k, val := range innerSet { - b.Enum[k] = val - } + copy(b.Enum, innerSet) default: b.Enum = []interface{}{bt.Enum} }