MCPcopy Create free account
hub / github.com/InferCore/InferCore / nullIfEmpty

Function nullIfEmpty

internal/requests/postgres.go:84–89  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

82}
83
84func nullIfEmpty(b []byte) interface{} {
85 if len(b) == 0 {
86 return nil
87 }
88 return string(b)
89}
90
91func (s *postgresStore) UpdateRequest(ctx context.Context, requestID string, patch RequestPatch) error {
92 r, err := s.GetRequest(ctx, requestID)

Callers 1

CreateRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected