1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- commands/server.go.orig 2017-06-26 10:39:59 UTC
+++ commands/server.go
@@ -3,7 +3,6 @@ package commands
import (
"context"
"flag"
- "os"
"github.com/google/subcommands"
c "github.com/kotakanbe/go-cve-dictionary/config"
@@ -37,7 +36,7 @@ func (*ServerCmd) Usage() string {
server
[-bind=127.0.0.1]
[-port=8000]
- [-dbpath=$PWD/cve.sqlite3 or connection string]
+ [-dbpath=/var/db/vuls/cve.sqlite3 or connection string]
[-dbtype=mysql|postgres|sqlite3|redis]
[-debug]
[-debug-sql]
@@ -56,8 +55,7 @@ func (p *ServerCmd) SetFlags(f *flag.Fla
defaultLogDir := util.GetDefaultLogDir()
f.StringVar(&p.logDir, "log-dir", defaultLogDir, "/path/to/log")
- pwd := os.Getenv("PWD")
- f.StringVar(&p.dbpath, "dbpath", pwd+"/cve.sqlite3",
+ f.StringVar(&p.dbpath, "dbpath", "/var/db/vuls/cve.sqlite3",
"/path/to/sqlite3 or SQL connection string")
f.StringVar(&p.dbtype, "dbtype", "sqlite3",
|