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 (prometheus#2989)

Signed-off-by: coderwander <770732124@qq.com>
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
  • Loading branch information
coderwander authored and v-zhuravlev committed Nov 1, 2024
1 parent f49d81c commit 7752ff9
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 7752ff9

Please sign in to comment.