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

1
.gitignore vendored
View File

@@ -1,7 +1,6 @@
vuls
.vscode
*.txt
*.json
*.sqlite3*
*.db
tags

View File

@@ -1,7 +1,6 @@
.PHONY: \
glide \
deps \
update \
dep \
depup \
build \
install \
all \
@@ -22,21 +21,20 @@ REVISION := $(shell git rev-parse --short HEAD)
LDFLAGS := -X 'main.version=$(VERSION)' \
-X 'main.revision=$(REVISION)'
all: glide deps build test
all: dep build test
glide:
go get github.com/Masterminds/glide
dep:
go get -u github.com/golang/dep/...
dep ensure
deps: glide
glide install
depup:
go get -u github.com/golang/dep/...
dep ensure -update
update: glide
glide update
build: main.go deps
build: main.go dep
go build -ldflags "$(LDFLAGS)" -o vuls $<
install: main.go deps
install: main.go dep
go install -ldflags "$(LDFLAGS)"

View File

@@ -1468,14 +1468,14 @@ see [go-cve-dictionary#usage-fetch-nvd-data](https://github.com/kotakanbe/go-cve
----
# Update Vuls With Glide
# How to Update
- Update go-cve-dictionary
If the DB schema was changed, please specify new SQLite3 or MySQL DB file.
```
$ cd $GOPATH/src/github.com/kotakanbe/go-cve-dictionary
$ git pull
$ mv vendor /tmp/foo
$ rm -r vendor
$ make install
```
@@ -1483,7 +1483,7 @@ $ make install
```
$ cd $GOPATH/src/github.com/future-architect/vuls
$ git pull
$ mv vendor /tmp/bar
$ rm -r vendor
$ make install
```
Binary file was built under $GOPATH/bin

123
glide.lock generated
View File

@@ -1,123 +0,0 @@
hash: c3167d83e68562cd7ef73f138ce60cb9e60b72b50394e8615388d1f3ba9fbef2
updated: 2017-02-08T11:59:59.893522816+09:00
imports:
- name: github.com/asaskevich/govalidator
version: 7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877
- name: github.com/aws/aws-sdk-go
version: 5b341290c488aa6bd76b335d819b4a68516ec3ab
subpackages:
- aws
- aws/awserr
- aws/awsutil
- aws/client
- aws/client/metadata
- aws/corehandlers
- aws/credentials
- aws/credentials/ec2rolecreds
- aws/credentials/endpointcreds
- aws/credentials/stscreds
- aws/defaults
- aws/ec2metadata
- aws/request
- aws/session
- aws/signer/v4
- private/endpoints
- private/protocol
- private/protocol/query
- private/protocol/query/queryutil
- private/protocol/rest
- private/protocol/restxml
- private/protocol/xml/xmlutil
- private/waiter
- service/s3
- service/sts
- name: github.com/Azure/azure-sdk-for-go
version: 27ae5c8b5bc5d90ab0540b4c5d0f2632c8db8b57
subpackages:
- storage
- name: github.com/boltdb/bolt
version: 315c65d4cf4f5278c73477a35fb1f9b08365d340
- name: github.com/BurntSushi/toml
version: 99064174e013895bbd9b025c31100bd1d9b590ca
- name: github.com/cenkalti/backoff
version: 8edc80b07f38c27352fb186d971c628a6c32552b
- name: github.com/cheggaaa/pb
version: ad4efe000aa550bb54918c06ebbadc0ff17687b9
- name: github.com/go-ini/ini
version: 6e4869b434bd001f6983749881c7ead3545887d8
- name: github.com/go-sql-driver/mysql
version: d512f204a577a4ab037a1816604c48c9c13210be
- name: github.com/google/subcommands
version: a71b91e238406bd68766ee52db63bebedce0e9f6
- name: github.com/gosuri/uitable
version: 36ee7e946282a3fb1cfecd476ddc9b35d8847e42
subpackages:
- util/strutil
- util/wordwrap
- name: github.com/howeyc/gopass
version: f5387c492211eb133053880d23dfae62aa14123d
- name: github.com/jinzhu/gorm
version: 39165d498058a823126af3cbf4d2a3b0e1acf11e
subpackages:
- dialects/mysql
- dialects/sqlite
- name: github.com/jinzhu/inflection
version: 74387dc39a75e970e7a3ae6a3386b5bd2e5c5cff
- name: github.com/jmespath/go-jmespath
version: bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d
- name: github.com/jroimartin/gocui
version: ba396278de0a3c63658bbaba13d2d2fa392edb11
- name: github.com/k0kubun/pp
version: f5dce6ed0ccf6c350f1679964ff6b61f3d6d2033
- name: github.com/kotakanbe/go-cve-dictionary
version: bbfdd41e7785a9b7163b5109b10ac2dea8f36d84
subpackages:
- config
- db
- jvn
- log
- models
- nvd
- util
- name: github.com/kotakanbe/go-pingscanner
version: 58e188a3e4f6ab1a6371e33421e4502e26fa1e80
- name: github.com/kotakanbe/logrus-prefixed-formatter
version: f4f7d41649cf1e75e736884da8d05324aa76ea25
- name: github.com/mattn/go-colorable
version: 6c903ff4aa50920ca86087a280590b36b3152b9c
- name: github.com/mattn/go-isatty
version: 66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8
- name: github.com/mattn/go-runewidth
version: 737072b4e32b7a5018b4a7125da8d12de90e8045
- name: github.com/mattn/go-sqlite3
version: 5510da399572b4962c020184bb291120c0a412e2
- name: github.com/mgutz/ansi
version: c286dcecd19ff979eeb73ea444e479b903f2cfcb
- name: github.com/moul/http2curl
version: b1479103caacaa39319f75e7f57fc545287fca0d
- name: github.com/nsf/termbox-go
version: b6acae516ace002cb8105a89024544a1480655a5
- name: github.com/parnurzeal/gorequest
version: e37b9d1efacf7c94820b29b75dd7d0c2996b3fb1
- name: github.com/rifflock/lfshook
version: 3f9d976bd7402de39b46357069fb6325a974572e
- name: github.com/Sirupsen/logrus
version: 3ec0642a7fb6488f65b06f9040adc67e3990296a
- name: golang.org/x/crypto
version: 9477e0b78b9ac3d0b03822fd95422e2fe07627cd
subpackages:
- curve25519
- ed25519
- ed25519/internal/edwards25519
- ssh
- ssh/agent
- ssh/terminal
- name: golang.org/x/net
version: 1d7a0b2100da090d8b02afcfb42f97e2c77e71a4
subpackages:
- publicsuffix
- name: golang.org/x/sys
version: 9bb9f0998d48b31547d975974935ae9b48c7a03c
subpackages:
- unix
testImports: []

View File

@@ -1,36 +0,0 @@
package: github.com/future-architect/vuls
import:
- package: github.com/Azure/azure-sdk-for-go
subpackages:
- storage
- package: github.com/BurntSushi/toml
- package: github.com/Sirupsen/logrus
- package: github.com/asaskevich/govalidator
- package: github.com/aws/aws-sdk-go
subpackages:
- aws
- aws/credentials
- aws/session
- service/s3
- package: github.com/boltdb/bolt
- package: github.com/cenkalti/backoff
- package: github.com/google/subcommands
- package: github.com/gosuri/uitable
- package: github.com/howeyc/gopass
- package: github.com/jroimartin/gocui
- package: github.com/k0kubun/pp
- package: github.com/kotakanbe/go-cve-dictionary
subpackages:
- config
- db
- log
- models
- package: github.com/kotakanbe/go-pingscanner
- package: github.com/kotakanbe/logrus-prefixed-formatter
- package: github.com/mattn/go-sqlite3
- package: github.com/parnurzeal/gorequest
- package: github.com/rifflock/lfshook
- package: golang.org/x/crypto
subpackages:
- ssh
- ssh/agent

351
lock.json Normal file
View File

@@ -0,0 +1,351 @@
{
"memo": "140762535167718dbd48285b8f9333e5bd98cfdf0e07db7d4a3c823e1d898f83",
"projects": [
{
"name": "github.com/Azure/azure-storage-go",
"branch": "master",
"revision": "12ccaadb081cdd217702067d28da9a7ff4305239",
"packages": [
"."
]
},
{
"name": "github.com/Azure/go-autorest",
"version": "v7.3.0",
"revision": "ec5f4903f77ed9927ac95b19ab8e44ada64c1356",
"packages": [
"autorest",
"autorest/azure",
"autorest/date"
]
},
{
"name": "github.com/BurntSushi/toml",
"version": "v0.3.0",
"revision": "b26d9c308763d68093482582cea63d69be07a0f0",
"packages": [
"."
]
},
{
"name": "github.com/Sirupsen/logrus",
"branch": "master",
"revision": "10f801ebc38b33738c9d17d50860f484a0988ff5",
"packages": [
"."
]
},
{
"name": "github.com/asaskevich/govalidator",
"version": "v5",
"revision": "7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877",
"packages": [
"."
]
},
{
"name": "github.com/aws/aws-sdk-go",
"revision": "5b341290c488aa6bd76b335d819b4a68516ec3ab",
"packages": [
"aws",
"aws/awserr",
"aws/awsutil",
"aws/client",
"aws/client/metadata",
"aws/corehandlers",
"aws/credentials",
"aws/credentials/ec2rolecreds",
"aws/credentials/endpointcreds",
"aws/credentials/stscreds",
"aws/defaults",
"aws/ec2metadata",
"aws/request",
"aws/session",
"aws/signer/v4",
"private/endpoints",
"private/protocol",
"private/protocol/query",
"private/protocol/query/queryutil",
"private/protocol/rest",
"private/protocol/restxml",
"private/protocol/xml/xmlutil",
"private/waiter",
"service/s3",
"service/sts"
]
},
{
"name": "github.com/boltdb/bolt",
"version": "v1.3.0",
"revision": "583e8937c61f1af6513608ccc75c97b6abdf4ff9",
"packages": [
"."
]
},
{
"name": "github.com/cenkalti/backoff",
"version": "v1.0.0",
"revision": "32cd0c5b3aef12c76ed64aaf678f6c79736be7dc",
"packages": [
"."
]
},
{
"name": "github.com/cheggaaa/pb",
"version": "v1.0.11",
"revision": "0817e3a1f8de9e3c78b159699b3c07d53e24a963",
"packages": [
"."
]
},
{
"name": "github.com/dgrijalva/jwt-go",
"version": "v3.0.0",
"revision": "d2709f9f1f31ebcda9651b03077758c1f3a0018c",
"packages": [
"."
]
},
{
"name": "github.com/go-ini/ini",
"version": "v1.27.0",
"revision": "e7fea39b01aea8d5671f6858f0532f56e8bff3a5",
"packages": [
"."
]
},
{
"name": "github.com/go-sql-driver/mysql",
"version": "v1.3",
"revision": "a0583e0143b1624142adab07e0e97fe106d99561",
"packages": [
"."
]
},
{
"name": "github.com/google/subcommands",
"branch": "master",
"revision": "ce3d4cfc062faac7115d44e5befec8b5a08c3faa",
"packages": [
"."
]
},
{
"name": "github.com/gosuri/uitable",
"branch": "master",
"revision": "36ee7e946282a3fb1cfecd476ddc9b35d8847e42",
"packages": [
".",
"util/strutil",
"util/wordwrap"
]
},
{
"name": "github.com/howeyc/gopass",
"branch": "master",
"revision": "bf9dde6d0d2c004a008c27aaee91170c786f6db8",
"packages": [
"."
]
},
{
"name": "github.com/jinzhu/gorm",
"version": "v1.0",
"revision": "5174cc5c242a728b435ea2be8a2f7f998e15429b",
"packages": [
".",
"dialects/mysql",
"dialects/sqlite"
]
},
{
"name": "github.com/jinzhu/inflection",
"branch": "master",
"revision": "1c35d901db3da928c72a72d8458480cc9ade058f",
"packages": [
"."
]
},
{
"name": "github.com/jmespath/go-jmespath",
"version": "0.2.2",
"revision": "3433f3ea46d9f8019119e7dd41274e112a2359a9",
"packages": [
"."
]
},
{
"name": "github.com/jroimartin/gocui",
"branch": "master",
"revision": "612b0b2987ec1a6af46d7008cef1efd4b3898346",
"packages": [
"."
]
},
{
"name": "github.com/k0kubun/pp",
"version": "v2.3.0",
"revision": "027a6d1765d673d337e687394dbe780dd64e2a1e",
"packages": [
"."
]
},
{
"name": "github.com/kotakanbe/go-cve-dictionary",
"branch": "master",
"revision": "65eb51c29cf8f7d708c3baa5d2b6cf4992f4b997",
"packages": [
"config",
"db",
"jvn",
"log",
"models",
"nvd",
"util"
]
},
{
"name": "github.com/kotakanbe/go-pingscanner",
"version": "v0.1.0",
"revision": "641dc2cc2d3cbf295dad356667b74c69bcbd6f70",
"packages": [
"."
]
},
{
"name": "github.com/kotakanbe/logrus-prefixed-formatter",
"branch": "master",
"revision": "e7519b8c80ba008a3bfc57ffa31232bf2a77f455",
"packages": [
"."
]
},
{
"name": "github.com/mattn/go-colorable",
"version": "v0.0.7",
"revision": "d228849504861217f796da67fae4f6e347643f15",
"packages": [
"."
]
},
{
"name": "github.com/mattn/go-isatty",
"version": "v0.0.2",
"revision": "fc9e8d8ef48496124e79ae0df75490096eccf6fe",
"packages": [
"."
]
},
{
"name": "github.com/mattn/go-runewidth",
"version": "v0.0.2",
"revision": "9e777a8366cce605130a531d2cd6363d07ad7317",
"packages": [
"."
]
},
{
"name": "github.com/mattn/go-sqlite3",
"version": "v1.2.0",
"revision": "ca5e3819723d8eeaf170ad510e7da1d6d2e94a08",
"packages": [
"."
]
},
{
"name": "github.com/mgutz/ansi",
"branch": "master",
"revision": "9520e82c474b0a04dd04f8a40959027271bab992",
"packages": [
"."
]
},
{
"name": "github.com/moul/http2curl",
"branch": "master",
"revision": "4e24498b31dba4683efb9d35c1c8a91e2eda28c8",
"packages": [
"."
]
},
{
"name": "github.com/nsf/termbox-go",
"branch": "master",
"revision": "7994c181db7761ca3c67a217068cf31826113f5f",
"packages": [
"."
]
},
{
"name": "github.com/parnurzeal/gorequest",
"version": "v0.2.15",
"revision": "a578a48e8d6ca8b01a3b18314c43c6716bb5f5a3",
"packages": [
"."
]
},
{
"name": "github.com/pkg/errors",
"version": "v0.8.0",
"revision": "645ef00459ed84a119197bfb8d8205042c6df63d",
"packages": [
"."
]
},
{
"name": "github.com/rifflock/lfshook",
"version": "1.5",
"revision": "1ae91782cf87524466b000ea12d8291ea48269be",
"packages": [
"."
]
},
{
"name": "golang.org/x/crypto",
"branch": "master",
"revision": "3cb07270c9455e8ad27956a70891c962d121a228",
"packages": [
"curve25519",
"ed25519",
"ed25519/internal/edwards25519",
"ssh",
"ssh/agent",
"ssh/terminal"
]
},
{
"name": "golang.org/x/net",
"branch": "master",
"revision": "ffcf1bedda3b04ebb15a168a59800a73d6dc0f4d",
"packages": [
"context",
"idna",
"publicsuffix"
]
},
{
"name": "golang.org/x/sys",
"branch": "master",
"revision": "9a7256cb28ed514b4e1e5f68959914c4c28a92e0",
"packages": [
"unix"
]
},
{
"name": "golang.org/x/text",
"branch": "master",
"revision": "f4b4367115ec2de254587813edaa901bc1c723a8",
"packages": [
"internal/gen",
"internal/triegen",
"internal/ucd",
"secure/bidirule",
"transform",
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
"unicode/rangetable"
]
}
]
}

25
manifest.json Normal file
View File

@@ -0,0 +1,25 @@
{
"dependencies": {
"github.com/Azure/azure-storage-go": {
"branch": "master"
},
"github.com/BurntSushi/toml": {
"branch": "master"
},
"github.com/Sirupsen/logrus": {
"branch": "master"
},
"github.com/aws/aws-sdk-go": {
"revision": "5b341290c488aa6bd76b335d819b4a68516ec3ab"
},
"github.com/jroimartin/gocui": {
"branch": "master"
},
"github.com/kotakanbe/go-cve-dictionary": {
"branch": "master"
},
"github.com/kotakanbe/logrus-prefixed-formatter": {
"branch": "master"
}
}
}

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