aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migration/schemas_bindata.go
blob: 695c2c113521ac520e2eeec4b3aef4e61bbd7ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

//go:build bindata

//go:generate go run ../../build/generate-bindata.go ../../modules/migration/schemas bindata.dat

package migration

import (
	"io"
	"io/fs"
	"path"
	"sync"

	_ "embed"

	"code.gitea.io/gitea/modules/assetfs"
)

//go:embed bindata.dat
var bindata []byte

var BuiltinAssets = sync.OnceValue(func() fs.FS {
	return assetfs.NewEmbeddedFS(bindata)
})

func openSchema(filename string) (io.ReadCloser, error) {
	return BuiltinAssets().Open(path.Base(filename))
}