policyIDForLog returns a stable, log-safe identifier for a patch policy or " " when the policy is nil. Used in scheduling log lines so a parse failure can be traced back to the offending policy.
(p *db.PatchPolicy)
| 122 | // "<none>" when the policy is nil. Used in scheduling log lines so a parse |
| 123 | // failure can be traced back to the offending policy. |
| 124 | func policyIDForLog(p *db.PatchPolicy) string { |
| 125 | if p == nil { |
| 126 | return "<none>" |
| 127 | } |
| 128 | return p.ID |
| 129 | } |
| 130 | |
| 131 | // fixedTimeForLog returns the raw fixed_time_utc value (or "<nil>") for a |
| 132 | // policy, suitable for inclusion in slog fields. slog escapes control |
no outgoing calls
no test coverage detected