return code
This commit is contained in:
parent
25306bdc34
commit
cb6afac593
20
server.go
20
server.go
@ -29,18 +29,16 @@ var (
|
|||||||
func Start(c *Config) {
|
func Start(c *Config) {
|
||||||
// Setup data dir //
|
// Setup data dir //
|
||||||
|
|
||||||
//// Commented out, otherwise In Docker it would throw 'panic: Failed to create data dir: mkdir "/data": no such file or directory'
|
_, err := os.Stat(c.DataDir)
|
||||||
// _, err := os.Stat(c.DataDir)
|
if os.IsNotExist(err) {
|
||||||
// if os.IsNotExist(err) {
|
err := os.Mkdir(c.DataDir, 0755)
|
||||||
// err := os.Mkdir(c.DataDir, 0755)
|
if err != nil {
|
||||||
// if err != nil {
|
panic("Failed to create data dir: " + err.Error())
|
||||||
// panic("Failed to create data dir: " + err.Error())
|
}
|
||||||
// }
|
} else if err != nil {
|
||||||
// } else if err != nil {
|
panic("Failed to check data dir: " + err.Error())
|
||||||
// panic("Failed to check data dir: " + err.Error())
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
var err error
|
|
||||||
benchmarksDir = filepath.Join(c.DataDir, "benchmarks")
|
benchmarksDir = filepath.Join(c.DataDir, "benchmarks")
|
||||||
_, err = os.Stat(benchmarksDir)
|
_, err = os.Stat(benchmarksDir)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user