/
githubmirror
/
goose
Обзор
Документация
Войти
/
githubmirror
/
goose
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
testdata/testdata.go
21 строка
490 B
Michael Fridman
Add Locker interface with Postgres table-based locking implementation (#993)
24 сен 2025, 15:40
Не верифицирован
24 сен 2025, 15:40
57d20f1
Код
Авторство
О чём код?
package testdata import ( "embed" "io/fs" ) //go:embed migrations/*.sql var migrationsFS embed.FS // MustMigrationsFS returns the embedded migrations filesystem. func MustMigrationsFS() fs.FS { fsys, err := fs.Sub(migrationsFS, "migrations") if err != nil { // This should never happen, since the subdirectory is hardcoded. If the layout of the // embedded files changes, this will panic to alert the developer to update the code // accordingly. panic(err) } return fsys }