Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBのDSN生成をライブラリに任せる #1873

Open
logica0419 opened this issue Jul 10, 2023 · 3 comments
Open

DBのDSN生成をライブラリに任せる #1873

logica0419 opened this issue Jul 10, 2023 · 3 comments
Labels
good first issue 比較的取り組みが簡単 kind/dev 開発内部(のみ)に関するもの

Comments

@logica0419
Copy link
Member

https://zenn.dev/mstn_/articles/75667657fa5aed

@logica0419
Copy link
Member Author

logica0419 commented Jul 10, 2023

ここ

traQ/cmd/config.go

Lines 391 to 398 in b20f816

DSN: fmt.Sprintf(
"%s:%s@tcp(%s:%d)/%s?charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=true",
c.MariaDB.Username,
c.MariaDB.Password,
c.MariaDB.Host,
c.MariaDB.Port,
c.MariaDB.Database,
),

@hijiki51 hijiki51 changed the title DBのDNS生成をライブラリに任せる DBのDSN生成をライブラリに任せる Jul 10, 2023
@ras0q
Copy link
Member

ras0q commented Jul 10, 2023

DSNじゃなくてまんまDSNConfig使えたりする
https://pkg.go.dev/gorm.io/driver/mysql#Config

@logica0419
Copy link
Member Author

神じゃん、それで

@logica0419 logica0419 added the kind/dev 開発内部(のみ)に関するもの label Jul 12, 2023
@logica0419 logica0419 added good first issue 比較的取り組みが簡単 refactoring labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 比較的取り組みが簡単 kind/dev 開発内部(のみ)に関するもの
Projects
None yet
Development

No branches or pull requests

3 participants