Update deps, Change deps tool from glide to dep (#412)

This commit is contained in:
Kota Kanbe
2017-04-01 20:06:28 +09:00
committed by GitHub
parent d4bec0dd9a
commit b33cd54916
8 changed files with 401 additions and 179 deletions

View File

@@ -24,7 +24,7 @@ import (
"fmt"
"time"
"github.com/Azure/azure-sdk-for-go/storage"
"github.com/Azure/azure-storage-go"
c "github.com/future-architect/vuls/config"
"github.com/future-architect/vuls/models"
@@ -104,11 +104,19 @@ func CheckIfAzureContainerExists() error {
if err != nil {
return err
}
ok, err := cli.ContainerExists(c.Conf.AzureContainer)
r, err := cli.ListContainers(storage.ListContainersParameters{})
if err != nil {
return err
}
if !ok {
found := false
for _, con := range r.Containers {
if con.Name == c.Conf.AzureContainer {
found = true
break
}
}
if !found {
return fmt.Errorf("Container not found. Container: %s", c.Conf.AzureContainer)
}
return nil