A tool to migrate GitHub Repositories to Gitea including all issues
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
gitea-github-migrator/api/fs.go

18 lines
282 B

package api
import (
"strings"
"github.com/gobuffalo/packr"
)
type BundledFS struct {
packr.Box
}
func (fs *BundledFS) Exists(prefix string, filepath string) bool {
if p := strings.TrimPrefix(filepath, prefix); len(p) < len(filepath) {
return fs.Has(p)
}
return false
}