MCPcopy Index your code
hub / github.com/labstack/echo / filepathOrContent

Function filepathOrContent

server.go:170–179  ·  view source on GitHub ↗
(fileOrContent any, certFilesystem fs.FS)

Source from the content-addressed store, hash-verified

168}
169
170func filepathOrContent(fileOrContent any, certFilesystem fs.FS) (content []byte, err error) {
171 switch v := fileOrContent.(type) {
172 case string:
173 return fs.ReadFile(certFilesystem, v)
174 case []byte:
175 return v, nil
176 default:
177 return nil, ErrInvalidCertOrKeyType
178 }
179}
180
181func gracefulShutdown(shutdownCtx stdContext.Context, sc *StartConfig, server *http.Server, logger *slog.Logger) {
182 <-shutdownCtx.Done() // wait until shutdown context is closed.

Callers 1

StartTLSMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…