From 523d062b040edcc7fbb5329646e78e42e3dc9b9e Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Thu, 5 Mar 2026 08:01:11 +0000 Subject: [PATCH] fix(msp): resolve unused error value and fix typo - Fix SA4006 staticcheck warning: unused err from GetDuration - Fix typo: 'addtion' -> 'addition' in comment --- msp/msp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msp/msp.go b/msp/msp.go index 93d7b50..5bf0392 100644 --- a/msp/msp.go +++ b/msp/msp.go @@ -12,7 +12,7 @@ func MostSpecificPeriod(ts time.Time, periods ...Period) (id string, err error) return "", ErrNoValidPeriods } // find the shortest duration - d, err := GetDuration(periods[0].GetStartTime(), periods[0].GetEndTime()) + d, _ := GetDuration(periods[0].GetStartTime(), periods[0].GetEndTime()) for _, x := range periods { p, err := GetDuration(x.GetStartTime(), x.GetEndTime()) if err == nil && p < d { @@ -34,7 +34,7 @@ func MostSpecificPeriod(ts time.Time, periods ...Period) (id string, err error) newest = x.GetStartTime() } } - // Determine whichever of these periods have the same start time in addtion to duration + // Determine whichever of these periods have the same start time in addition to duration var matchingDurationsAndStartTimes []Period for _, x := range matchingDurations { if x.GetStartTime() == newest {