mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-07 14:11:31 +00:00
fix: staticcheck S1016 struct conversion + Helm with/else-if parse error
- Use type conversion DigestStatusCount(c) instead of struct literal - Replace with...else-if (invalid in Go templates) with if...else-if chain - Add *.bak and cmd/agent/*.key/*.pem to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,11 @@ vendor/
|
|||||||
tmp/
|
tmp/
|
||||||
temp/
|
temp/
|
||||||
*.log
|
*.log
|
||||||
|
*.bak
|
||||||
|
|
||||||
|
# Private keys (agent-generated, never commit)
|
||||||
|
cmd/agent/*.key
|
||||||
|
cmd/agent/*.pem
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
*.db
|
*.db
|
||||||
|
|||||||
@@ -181,16 +181,16 @@ spec:
|
|||||||
{{- if .Values.server.volumes }}
|
{{- if .Values.server.volumes }}
|
||||||
{{- toYaml .Values.server.volumes | nindent 8 }}
|
{{- toYaml .Values.server.volumes | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.nodeAffinity }}
|
{{- if .Values.nodeAffinity }}
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml .Values.nodeAffinity | nindent 10 }}
|
||||||
{{- else if .Values.podAntiAffinity }}
|
{{- else if .Values.podAntiAffinity }}
|
||||||
affinity:
|
affinity:
|
||||||
podAntiAffinity:
|
podAntiAffinity:
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml .Values.podAntiAffinity | nindent 10 }}
|
||||||
{{- else if .Values.podAffinity }}
|
{{- else if .Values.podAffinity }}
|
||||||
affinity:
|
affinity:
|
||||||
podAffinity:
|
podAffinity:
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml .Values.podAffinity | nindent 10 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -122,10 +122,7 @@ func (s *DigestService) GenerateDigest(ctx context.Context) (*DigestData, error)
|
|||||||
s.logger.Warn("failed to get status counts for digest", "error", err)
|
s.logger.Warn("failed to get status counts for digest", "error", err)
|
||||||
} else if counts, ok := statusRaw.([]CertificateStatusCount); ok {
|
} else if counts, ok := statusRaw.([]CertificateStatusCount); ok {
|
||||||
for _, c := range counts {
|
for _, c := range counts {
|
||||||
digest.StatusCounts = append(digest.StatusCounts, DigestStatusCount{
|
digest.StatusCounts = append(digest.StatusCounts, DigestStatusCount(c))
|
||||||
Status: c.Status,
|
|
||||||
Count: c.Count,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user