(currentAPIVersion string)
| 8 | ) |
| 9 | |
| 10 | func CheckCCAPIVersion(currentAPIVersion string) (string, error) { |
| 11 | currentSemver, err := semver.Make(currentAPIVersion) |
| 12 | if err != nil { |
| 13 | return "", err |
| 14 | } |
| 15 | |
| 16 | minimumSemver, err := semver.Make(ccversion.MinSupportedClientVersionV8) |
| 17 | if err != nil { |
| 18 | return "", err |
| 19 | } |
| 20 | |
| 21 | if currentSemver.LT(minimumSemver) { |
| 22 | return fmt.Sprintf("\nWarning: Your targeted API's version (%s) is less than the minimum supported API version (%s). Some commands may not function correctly.", currentAPIVersion, ccversion.MinSupportedClientVersionV8), nil |
| 23 | } |
| 24 | |
| 25 | return "", nil |
| 26 | } |
no test coverage detected