MCPcopy
hub / github.com/docker/compose / composeFileAsByteReader

Function composeFileAsByteReader

pkg/compose/publish.go:748–758  ·  view source on GitHub ↗
(ctx context.Context, filePath string, project *types.Project)

Source from the content-addressed store, hash-verified

746}
747
748func composeFileAsByteReader(ctx context.Context, filePath string, project *types.Project) (io.Reader, error) {
749 base, err := loadUnresolvedFile(ctx, project, filePath)
750 if err != nil {
751 return nil, fmt.Errorf("failed to load compose file %s: %w", filePath, err)
752 }
753 in, err := base.MarshalYAML()
754 if err != nil {
755 return nil, err
756 }
757 return bytes.NewBuffer(in), nil
758}

Callers 1

checkForSensitiveDataMethod · 0.85

Calls 1

loadUnresolvedFileFunction · 0.85

Tested by

no test coverage detected