Add govet/golint into Travis CI build

Fix current issues
This commit is contained in:
Andrey Smirnov
2017-03-22 00:39:27 +03:00
parent 07472bec50
commit 11d828b3b1
22 changed files with 121 additions and 111 deletions

View File

@@ -3,18 +3,19 @@ package swift
import (
"encoding/json"
"fmt"
"github.com/ncw/swift"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/files"
"net/http"
"os"
"path/filepath"
"time"
"github.com/ncw/swift"
"github.com/smira/aptly/aptly"
"github.com/smira/aptly/files"
)
// PublishedStorage abstract file system with published files (actually hosted on Swift)
type PublishedStorage struct {
conn swift.Connection
conn *swift.Connection
container string
prefix string
supportBulkDelete bool
@@ -51,7 +52,7 @@ func NewPublishedStorage(username string, password string, authURL string, tenan
if tenantID == "" {
tenantID = os.Getenv("OS_TENANT_ID")
}
if domain == "" {
if domain == "" {
domain = os.Getenv("OS_USER_DOMAIN_NAME")
}
if domainID == "" {
@@ -64,7 +65,7 @@ func NewPublishedStorage(username string, password string, authURL string, tenan
tenantDomainID = os.Getenv("OS_PROJECT_DOMAIN_ID")
}
ct := swift.Connection{
ct := &swift.Connection{
UserName: username,
ApiKey: password,
AuthUrl: authURL,