()
| 102 | } |
| 103 | |
| 104 | func (a etcdVersionAnnotation) Validate() (errs []error) { |
| 105 | if a.version == nil { |
| 106 | return nil |
| 107 | } |
| 108 | if a.version.Major == 0 { |
| 109 | errs = append(errs, fmt.Errorf("%s: etcd_version major version should not be zero", a.fullName)) |
| 110 | } |
| 111 | if a.version.Patch != 0 { |
| 112 | errs = append(errs, fmt.Errorf("%s: etcd_version patch version should be zero", a.fullName)) |
| 113 | } |
| 114 | if a.version.PreRelease != "" { |
| 115 | errs = append(errs, fmt.Errorf("%s: etcd_version should not be prerelease", a.fullName)) |
| 116 | } |
| 117 | if a.version.Metadata != "" { |
| 118 | errs = append(errs, fmt.Errorf("%s: etcd_version should not have metadata", a.fullName)) |
| 119 | } |
| 120 | return errs |
| 121 | } |
| 122 | |
| 123 | func (a etcdVersionAnnotation) PrintLine(out io.Writer) error { |
| 124 | if a.version == nil { |
no test coverage detected