(artifact string)
| 22 | } |
| 23 | |
| 24 | func (s *LiveStore) createJSONLinesFilePath(artifact string) string { |
| 25 | if runtime.GOOS == "windows" { |
| 26 | // Colons are special characters in Windows and cannot be used in file names. |
| 27 | // Replace them with dashes to avoid issues. |
| 28 | artifact = strings.ReplaceAll(artifact, ":", "-") |
| 29 | } |
| 30 | |
| 31 | path := fmt.Sprintf("%s.jsonl", artifact) |
| 32 | if s.outputPath != "" { |
| 33 | return fmt.Sprintf("%s/%s", s.outputPath, path) |
| 34 | } |
| 35 | return path |
| 36 | } |
| 37 | |
| 38 | func (s *LiveStore) createMetadataFile(artifactDigest string, attestationsResp []*api.Attestation) (string, error) { |
| 39 | metadataFilePath := s.createJSONLinesFilePath(artifactDigest) |
no outgoing calls