From 9bb591efb25dc1a7940c8b5c493b0cebe0d6e8c0 Mon Sep 17 00:00:00 2001 From: Guillaume Belanger Date: Wed, 3 Jan 2024 17:22:03 -0500 Subject: [PATCH] chore: Enables gofmt linting (#40) --- .golangci.yml | 2 +- factory/factory.go | 2 +- producer/data_repository.go | 2 +- util/path.go | 3 ++- util/path_debug.go | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4cf8920..2c9cdcf 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -218,7 +218,7 @@ linters-settings: linters: enable: - # - gofmt + - gofmt - govet # - errcheck # - staticcheck diff --git a/factory/factory.go b/factory/factory.go index 7d977e3..a8a0f15 100644 --- a/factory/factory.go +++ b/factory/factory.go @@ -17,9 +17,9 @@ import ( "gopkg.in/yaml.v2" - "github.com/omec-project/udr/logger" "github.com/omec-project/config5g/proto/client" protos "github.com/omec-project/config5g/proto/sdcoreConfig" + "github.com/omec-project/udr/logger" "github.com/sirupsen/logrus" ) diff --git a/producer/data_repository.go b/producer/data_repository.go index 50add76..c0c5460 100644 --- a/producer/data_repository.go +++ b/producer/data_repository.go @@ -20,12 +20,12 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" "github.com/omec-project/MongoDBLibrary" + protos "github.com/omec-project/config5g/proto/sdcoreConfig" "github.com/omec-project/http_wrapper" "github.com/omec-project/openapi/models" udr_context "github.com/omec-project/udr/context" "github.com/omec-project/udr/logger" "github.com/omec-project/udr/util" - protos "github.com/omec-project/config5g/proto/sdcoreConfig" ) const ( diff --git a/util/path.go b/util/path.go index e67e1b0..3f77024 100644 --- a/util/path.go +++ b/util/path.go @@ -3,7 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 // -//+build !debug +//go:build !debug +// +build !debug package util diff --git a/util/path_debug.go b/util/path_debug.go index fe84b24..f56cf7d 100644 --- a/util/path_debug.go +++ b/util/path_debug.go @@ -3,7 +3,8 @@ // SPDX-License-Identifier: Apache-2.0 // -//+build debug +//go:build debug +// +build debug package util