Skip to content

Commit 9c4d28a

Browse files
authored
Merge pull request #449 from kuafuRace/carbon
Remove unnecessary `StdTime` convert
2 parents 584d894 + a28cb28 commit 9c4d28a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

internal/dockerfile/inlayHint.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ func InlayHint(hubService hub.Service, doc document.DockerfileDocument, rng prot
2929
if t.TagLastPushed != "" {
3030
c := carbon.Parse(t.TagLastPushed, carbon.Local)
3131
if c != nil && c.IsValid() {
32-
goTime := c.StdTime()
33-
localFormat := goTime.Format("2006-01-02 15:04:05 MST")
32+
localFormat := c.Layout("2006-01-02 15:04:05 MST")
3433
hints = append(hints, protocol.InlayHint{
3534
Label: fmt.Sprintf("(last pushed %v)", c.DiffForHumans()),
3635
PaddingLeft: types.CreateBoolPointer(true),

0 commit comments

Comments
 (0)