Created
January 19, 2026 11:35
-
-
Save ninedraft/41910b42bf00af06985024daa785ae5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package dbacces | |
| import ( | |
| "context" | |
| "database/sql" | |
| _ "embed" | |
| ) | |
| //go:embed migrations/init.sql | |
| var initsql string | |
| func Init(ctx context.Context, db *sql.DB) error { | |
| _, err := db.ExecContext(ctx, initsql) | |
| return err | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment