Added: creating database, sql tx repository
This commit is contained in:
1 parent
1aa78d10c5
commit
fdd1c98e75
10 files changed
+159
-1
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
)
|
||||
|
||||
type AppConfig struct {
|
||||
SqlTablesDir string `json:"sql-tables-dir"`
|
||||
}
|
||||
|
||||
var appConfigInstance *AppConfig
|
||||
|
||||
func Setup() {
|
||||
file, err := os.ReadFile("config.json")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err = json.Unmarshal(file, &appConfigInstance); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func GetAppConfig() *AppConfig { return appConfigInstance }
|
||||
Reference in new issue
Block a user