File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- package environement
1+ package environment
22
33import (
44 "errors"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package mysql
22
33import (
44 "fmt"
5- "github.com/SbstnErhrdt/go-gorm-all-sql/pkg/environement "
5+ "github.com/SbstnErhrdt/go-gorm-all-sql/pkg/environment "
66 "gorm.io/driver/mysql"
77 "gorm.io/gorm"
88 "log"
@@ -19,7 +19,7 @@ var requiredEnvironmentVariablesForMySQL = []string{
1919
2020func ConnectToMysql (config * gorm.Config ) (client * gorm.DB , err error ) {
2121 // check env variables
22- environement .CheckEnvironmentVariables (requiredEnvironmentVariablesForMySQL )
22+ environment .CheckEnvironmentVariables (requiredEnvironmentVariablesForMySQL )
2323 // env variables
2424 host := os .Getenv ("SQL_HOST" )
2525 user := os .Getenv ("SQL_USER" )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package postgres
22
33import (
44 "fmt"
5- "github.com/SbstnErhrdt/go-gorm-all-sql/pkg/environement "
5+ "github.com/SbstnErhrdt/go-gorm-all-sql/pkg/environment "
66 "gorm.io/driver/postgres"
77 "gorm.io/gorm"
88 "log"
@@ -20,7 +20,7 @@ var requiredEnvironmentVariablesForPostGres = []string{
2020// Creates a connection to a postgres database
2121func ConnectToPostgres (config * gorm.Config ) (client * gorm.DB , err error ) {
2222 // check env variables
23- environement .CheckEnvironmentVariables (requiredEnvironmentVariablesForPostGres )
23+ environment .CheckEnvironmentVariables (requiredEnvironmentVariablesForPostGres )
2424 // required env variables
2525 host := os .Getenv ("SQL_HOST" )
2626 user := os .Getenv ("SQL_USER" )
Original file line number Diff line number Diff line change 11package sqlite
22
33import (
4- "github.com/SbstnErhrdt/go-gorm-all-sql/pkg/environement "
4+ "github.com/SbstnErhrdt/go-gorm-all-sql/pkg/environment "
55 "gorm.io/driver/sqlite"
66 "gorm.io/gorm"
77 "log"
@@ -14,7 +14,7 @@ var requiredEnvironmentVariablesForSQLite = []string{
1414
1515func ConnectToSQLite (config * gorm.Config ) (client * gorm.DB , err error ) {
1616 // check env variables
17- environement .CheckEnvironmentVariables (requiredEnvironmentVariablesForSQLite )
17+ environment .CheckEnvironmentVariables (requiredEnvironmentVariablesForSQLite )
1818 dbName := os .Getenv ("SQL_DATABASE" )
1919 // connect to database
2020 client , err = gorm .Open (sqlite .Open (dbName ), config )
You can’t perform that action at this time.
0 commit comments