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

Method Get

templates/embed.go:30–37  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

28}
29
30func (fs *fileSystem) Get(name string) (io.Reader, error) {
31 for i := range fs.files {
32 if fs.files[i].Name()+fs.files[i].Ext() == name {
33 return bytes.NewReader(fs.files[i].Data()), nil
34 }
35 }
36 return nil, errors.Newf("file %q not found", name)
37}
38
39func mustNames(fsys fs.FS) []string {
40 var names []string

Callers

nothing calls this directly

Calls 1

NameMethod · 0.45

Tested by

no test coverage detected