(value, flagName string)
| 112 | } |
| 113 | |
| 114 | func validateMarkdownDiffVersionValue(value, flagName string) error { |
| 115 | value = strings.TrimSpace(value) |
| 116 | if value == "" { |
| 117 | return markdownValidationParamError(flagName, "%s cannot be empty", flagName) |
| 118 | } |
| 119 | if !markdownDiffVersionRe.MatchString(value) { |
| 120 | return markdownValidationParamError(flagName, "%s must be a numeric version string", flagName) |
| 121 | } |
| 122 | return nil |
| 123 | } |
| 124 | |
| 125 | func markdownDiffMode(spec markdownDiffSpec) string { |
| 126 | if spec.FilePath != "" { |
no test coverage detected