Skip to content

Add special formatting for time.Time #999

@insight1111

Description

@insight1111

Please answer the following before submitting your issue:

Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.

  1. What version of Delve are you using (dlv version)?
    Delve Debugger
    Version: 1.0.0-rc.2
  2. What version of Go are you using? (go version)?
    go version go1.9 windows/amd64
  3. What operating system and processor architecture are you using?
    Windows10 64bit
  4. What did you do?
package main

import (
    "fmt"
    "time"
)
func main() {
    t:=time.Now()
    fmt.Println(t)
}

and run

dlv debug
b main.main
c
...
print t
  1. What did you expect to see?
    I want to get string like below formatted time text
    2017-10-23 11:03:00 ...
  2. What did you see instead?
time.Time {
        wall: 13723543243807126424,
        ext: 4158612300,
        loc: *time.Location {
                name: "",
                zone: []time.zone len: 0, cap: 0, nil,
                tx: []time.zoneTrans len: 0, cap: 0, nil,
                cacheStart: 0,
                cacheEnd: 0,
                cacheZone: *time.zone nil,},}

How to get formatted time text in dlv debug mode?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions