Skip to content

Commit

Permalink
refactor: Optimize code by using built-in constants in the standard l…
Browse files Browse the repository at this point in the history
…ibrary (#2989)

Signed-off-by: coderwander <770732124@qq.com>
  • Loading branch information
coderwander authored Apr 16, 2024
1 parent bf67c85 commit 0202220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/os_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (c *osReleaseCollector) UpdateStruct(path string) error {
}

if c.os.SupportEnd != "" {
c.supportEnd, err = time.Parse("2006-01-02", c.os.SupportEnd)
c.supportEnd, err = time.Parse(time.DateOnly, c.os.SupportEnd)

if err != nil {
return err
Expand Down

0 comments on commit 0202220

Please sign in to comment.