MCPcopy Index your code
hub / github.com/coder/coder / Open

Method Open

site/site.go:762–781  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

760}
761
762func (jfs justFilesSystem) Open(name string) (fs.File, error) {
763 f, err := jfs.FS.Open(name)
764 if err != nil {
765 return nil, err
766 }
767
768 stat, err := f.Stat()
769 if err != nil {
770 return nil, err
771 }
772
773 // Returning a 404 here does prevent the http.FileServer from serving
774 // index.* files automatically. Coder handles this above as all index pages
775 // are considered template files. So we never relied on this behavior.
776 if stat.IsDir() {
777 return nil, os.ErrNotExist
778 }
779
780 return f, nil
781}
782
783// RenderOAuthAllowData contains the variables that are found in
784// site/static/oauth2allow.html.

Callers 15

TarFunction · 0.45
enumValuesFromDumpFunction · 0.45
mainFunction · 0.45
connectDBFunction · 0.45
runFunction · 0.45
mainFunction · 0.45
readMetricsFromFileFunction · 0.45
mainFunction · 0.45
generateConstraintsFunction · 0.45
handleTestSubprocessFunction · 0.45
newPtyFunction · 0.45
licenseAddMethod · 0.45

Calls

no outgoing calls

Tested by 4

handleTestSubprocessFunction · 0.36
TestServerDBCryptFunction · 0.36
TestExtractOrReadBinFSFunction · 0.36