MCPcopy
hub / github.com/gofiber/fiber / SetXMLWithContext

Method SetXMLWithContext

shared_state.go:196–202  ·  view source on GitHub ↗
(ctx context.Context, key string, v any, ttl time.Duration)

Source from the content-addressed store, hash-verified

194}
195
196func (s *SharedState) SetXMLWithContext(ctx context.Context, key string, v any, ttl time.Duration) error {
197 if err := s.ensureStorage(); err != nil {
198 return err
199 }
200
201 return s.setEncodedWithContext(ctx, key, v, ttl, s.xmlEncoder, "xml")
202}
203
204func (s *SharedState) GetXML(key string, out any) ([]byte, bool, error) { //nolint:gocritic // Keep unnamed returns for clarity.
205 return s.GetXMLWithContext(context.Background(), key, out)

Callers 1

SetXMLMethod · 0.95

Calls 2

ensureStorageMethod · 0.95
setEncodedWithContextMethod · 0.95

Tested by

no test coverage detected