mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 12:30:46 +01:00
refactor: Optimize code by using built-in constants in the standard library (#2989)
Signed-off-by: coderwander <770732124@qq.com>
This commit is contained in:
parent
bf67c859bb
commit
0202220881
@ -180,7 +180,7 @@ func (c *osReleaseCollector) UpdateStruct(path string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if c.os.SupportEnd != "" {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user