Skip to content

Commit

Permalink
🚧 removing port from params
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Aug 24, 2022
1 parent 077b578 commit deb8337
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ var Os *opensearch.Client

func DSN() string {
return fmt.Sprintf(
"%s:%s@tcp(%s:%s)/%s?charset=utf8&parseTime=True&loc=Local",
"%s:%s@tcp(%s)/%s",
setting.Database.Username,
setting.Database.Password,
setting.Database.Host,
setting.Database.Port,
setting.Database.Database,
)
}
Expand Down
2 changes: 0 additions & 2 deletions setting/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package setting
type DatabaseSetting struct {
Driver string
Host string
Port string
Database string
Username string
Password string
Expand All @@ -18,7 +17,6 @@ func DatabaseSetup() *DatabaseSetting {
Database.Logging = env("DB_LOGGING", "false")
Database.Driver = env("DB_DRIVER", "mysql")
Database.Host = env("DB_HOST", "localhost")
Database.Port = env("DB_PORT", "3306")
Database.Database = env("DB_DATABASE", "tonic")
Database.Username = env("DB_USERNAME", "root")
Database.Password = env("DB_PASSWORD", "")
Expand Down

0 comments on commit deb8337

Please sign in to comment.