(expireDate time.Time)
| 1455 | } |
| 1456 | |
| 1457 | func checkSSLStatus(expireDate time.Time) string { |
| 1458 | now := time.Now() |
| 1459 | daysUntilExpiry := int(expireDate.Sub(now).Hours() / 24) |
| 1460 | |
| 1461 | if daysUntilExpiry < 0 { |
| 1462 | return "danger" |
| 1463 | } else if daysUntilExpiry <= 10 { |
| 1464 | return "warning" |
| 1465 | } |
| 1466 | return "success" |
| 1467 | } |
| 1468 | |
| 1469 | func getResourceContent(fileOp files.FileOp, resourcePath string) (string, error) { |
| 1470 | if fileOp.Stat(resourcePath) { |