pkg: address managed DNS mode review feedback

This commit is contained in:
Dev Scribe
2026-08-24 15:18:01 +07:00
committed by Cuong Manh Le
parent 47dd64b901
commit f0b60f3efa
10 changed files with 86 additions and 24 deletions
+2 -5
View File
@@ -124,11 +124,8 @@ func (s *systemd) Start() error {
// This is necessary for running self-upgrade flow.
func ensureSystemdKillMode(r io.Reader) (opts []*unit.UnitOption, change bool) {
opts, err := unit.DeserializeOptions(r)
// staticcheck sees only the explicit non-nil sends on the lexer's error
// channel, so it reports this comparison as always true. On success the
// lexer sends nothing and closes the channel, so the receive yields a nil
// error and this branch is not taken.
//lint:ignore SA4023 upstream delivers a nil error by closing the channel
// On success the lexer sends nothing and closes the channel, so the receive
// yields a nil error and this branch is not taken.
if err != nil {
mainLog.Load().Error().Err(err).Msg("Failed to deserialize options")
return