package main import ( "encoding/json" "log" "os" "rest/database/dbtools" "rest/restlayer" ) type Configuration struct { DriverName string `json:"driverName"` DataSourceName string `json:"dataSourceName"` } func main() { file, err := os.Open("database/configuration/config.json") if err != nil { log.Fatal(err.Error()) } defer file.Close() conf := new(Configuration) json.NewDecoder(file).Decode(conf) dbtools.DBInitilize(conf.DriverName,conf.DataSourceName) restlayer.RestStart("127.0.0.1:8080") }