初始提交: Gitea 项目代码

This commit is contained in:
root
2026-05-30 22:47:36 +08:00
commit f288f76350
6116 changed files with 776822 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
// 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/fs"
"path"
"sync"
"gitea.dev/modules/assetfs"
_ "embed"
"github.com/santhosh-tekuri/jsonschema/v6"
)
//go:embed bindata.dat
var bindata []byte
var BuiltinAssets = sync.OnceValue(func() fs.FS {
return assetfs.NewEmbeddedFS(bindata)
})
func openSchema(filename string) (any, error) {
f, err := BuiltinAssets().Open(path.Base(filename))
if err != nil {
return nil, err
}
defer f.Close()
return jsonschema.UnmarshalJSON(f)
}