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 != "" {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue