Skip to content

Commit 2786855

Browse files
author
Jamie Tanna
committed
Lint: remove warning for ineffectual
As we'll come back to it later. pkg/runtime/deepobject.go:245:5: ineffectual assignment to tm (ineffassign) tm, err = time.Parse(types.DateFormat, pathValues.value)
1 parent 1270742 commit 2786855

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

deepobject.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ func assignPathValues(dst interface{}, pathValues fieldOrValue) error {
242242
tm, err = time.Parse(time.RFC3339Nano, pathValues.value)
243243
if err != nil {
244244
// Fall back to parsing it as a date.
245-
tm, err = time.Parse(types.DateFormat, pathValues.value)
245+
// TODO: why is this marked as an ineffassign?
246+
tm, err = time.Parse(types.DateFormat, pathValues.value) //nolint:ineffassign,staticcheck
246247
if err != nil {
247248
return fmt.Errorf("error parsing tim as RFC3339 or 2006-01-02 time: %s", err)
248249
}

0 commit comments

Comments
 (0)