Refactoring part 1: Fix some annoying linter warnings in API code (#1064)

* names, constants of reusable strings, removed unneeded `if`, replaced deprecated imports

* more deprecated imports replaced

* What is this?))

* Fix a path and quote a var in Dockerfile

* Addressing review comments

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
This commit is contained in:
Kostiantyn
2024-09-30 15:45:02 +03:00
committed by GitHub
parent 70a3944e21
commit d1193c5ca4
38 changed files with 334 additions and 309 deletions

View File

@@ -1,7 +1,6 @@
package utils_test
import (
"io/ioutil"
"os"
"path"
"testing"
@@ -18,7 +17,7 @@ func TestIsDirSymlink(t *testing.T) {
test_utils.FilesystemTest(t)
// Prepare a temporary directory for testing purposes
dir, err := ioutil.TempDir("", "testing")
dir, err := os.MkdirTemp("", "testing")
if err != nil {
t.Fatalf("unable to create temp directory for testing")
}