sourceRepoLabel returns the source repo string for display in error messages. When the repo string is empty (file has no source field or is not a markdown file), a human-readable placeholder is returned so the error message is not confusing.
(repo string)
| 101 | // When the repo string is empty (file has no source field or is not a markdown file), |
| 102 | // a human-readable placeholder is returned so the error message is not confusing. |
| 103 | func sourceRepoLabel(repo string) string { |
| 104 | if repo == "" { |
| 105 | return "(no source field)" |
| 106 | } |
| 107 | return repo |
| 108 | } |
no outgoing calls