fix golangci-lint and compilation errors

This commit is contained in:
André Roth
2024-04-21 13:47:12 +02:00
parent f9325fbc91
commit c33141d49b
3 changed files with 5 additions and 4 deletions

View File

@@ -3,7 +3,6 @@ package api
import ( import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"log"
"net/http" "net/http"
"os" "os"
"sort" "sort"

View File

@@ -1,6 +1,7 @@
// Package azure handles publishing to Azure Storage
package azure package azure
// Package azure handles publishing to Azure Storage
import ( import (
"context" "context"
"encoding/hex" "encoding/hex"

View File

@@ -114,7 +114,8 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
sourcePath string, sourceChecksums utils.ChecksumInfo, force bool) error { sourcePath string, sourceChecksums utils.ChecksumInfo, force bool) error {
relFilePath := filepath.Join(publishedRelPath, fileName) relFilePath := filepath.Join(publishedRelPath, fileName)
prefixRelFilePath := filepath.Join(publishedPrefix, relFilePath) // prefixRelFilePath := filepath.Join(publishedPrefix, relFilePath)
// FIXME: check how to integrate publishedPrefix:
poolPath := storage.az.blobPath(fileName) poolPath := storage.az.blobPath(fileName)
if storage.pathCache == nil { if storage.pathCache == nil {
@@ -158,7 +159,7 @@ func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath,
} }
defer source.Close() defer source.Close()
err = storage.az.putFile(storage.az.blobURL(relPath), source, sourceMD5) err = storage.az.putFile(storage.az.blobURL(relFilePath), source, sourceMD5)
if err == nil { if err == nil {
pathCache[relFilePath] = sourceMD5 pathCache[relFilePath] = sourceMD5
} else { } else {