You've already forked openaccounting-server
forked from cybercinch/openaccounting-server
Updated log messages for ./config.json operations
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@@ -13,7 +14,6 @@ import (
|
|||||||
"github.com/openaccounting/oa-server/core/model/db"
|
"github.com/openaccounting/oa-server/core/model/db"
|
||||||
"github.com/openaccounting/oa-server/core/model/types"
|
"github.com/openaccounting/oa-server/core/model/types"
|
||||||
"github.com/openaccounting/oa-server/core/util"
|
"github.com/openaccounting/oa-server/core/util"
|
||||||
//"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -22,14 +22,14 @@ func main() {
|
|||||||
file, err := os.Open("./config.json")
|
file, err := os.Open("./config.json")
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(fmt.Errorf("failed to open ./config.json with " + err.Error()))
|
||||||
}
|
}
|
||||||
|
|
||||||
decoder := json.NewDecoder(file)
|
decoder := json.NewDecoder(file)
|
||||||
err = decoder.Decode(&config)
|
err = decoder.Decode(&config)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(fmt.Errorf("failed to decode ./config.json with " + err.Error()))
|
||||||
}
|
}
|
||||||
|
|
||||||
connectionString := config.User + ":" + config.Password + "@" + config.DatabaseAddress + "/" + config.Database
|
connectionString := config.User + ":" + config.Password + "@" + config.DatabaseAddress + "/" + config.Database
|
||||||
|
|||||||
Reference in New Issue
Block a user