MCPcopy Create free account
hub / github.com/cli/cli / createJSONLinesFileName

Method createJSONLinesFileName

pkg/cmd/attestation/download/metadata.go:32–40  ·  view source on GitHub ↗
(artifact string)

Source from the content-addressed store, hash-verified

30}
31
32func (s *LiveStore) createJSONLinesFileName(artifact string) string {
33 if runtime.GOOS == "windows" {
34 // Colons are special characters in Windows and cannot be used in file names.
35 // Replace them with dashes to avoid issues.
36 artifact = strings.ReplaceAll(artifact, ":", "-")
37 }
38
39 return fmt.Sprintf("%s.jsonl", artifact)
40}
41
42func (s *LiveStore) createMetadataFile(artifactDigest string, attestationsResp []*api.Attestation) (string, error) {
43 metadataFilePath := s.createJSONLinesFilePath(artifactDigest)

Callers 2

createMetadataFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected