MCPcopy Create free account
hub / github.com/gogs/gogs / getGitRepoPath

Function getGitRepoPath

internal/route/repo/http.go:402–413  ·  view source on GitHub ↗
(dir string)

Source from the content-addressed store, hash-verified

400}
401
402func getGitRepoPath(dir string) (string, error) {
403 if !strings.HasSuffix(dir, ".git") {
404 dir += ".git"
405 }
406
407 filename := filepath.Join(conf.Repository.Root, dir)
408 if _, err := os.Stat(filename); os.IsNotExist(err) {
409 return "", err
410 }
411
412 return filename, nil
413}
414
415func HTTP(c *HTTPContext) {
416 for _, route := range routes {

Callers 1

HTTPFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected