ParseEffectiveTime parses the effective time string
(effectiveTime string)
| 248 | |
| 249 | // ParseEffectiveTime parses the effective time string |
| 250 | func ParseEffectiveTime(effectiveTime string) (time.Time, error) { |
| 251 | switch effectiveTime { |
| 252 | case "now": |
| 253 | return time.Now().UTC(), nil |
| 254 | default: |
| 255 | return time.Parse(time.RFC3339, effectiveTime) |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | // ExtractImageDigest extracts image digest from identifier |
| 260 | func ExtractImageDigest(identifier string) string { |