MCPcopy
hub / github.com/urfave/cli / Timestamp

Method Timestamp

flag_timestamp.go:135–143  ·  view source on GitHub ↗

Timestamp gets the timestamp from a flag name

(name string)

Source from the content-addressed store, hash-verified

133
134// Timestamp gets the timestamp from a flag name
135func (cmd *Command) Timestamp(name string) time.Time {
136 if v, ok := cmd.Value(name).(time.Time); ok {
137 tracef("time.Time available for flag name %[1]q with value=%[2]v (cmd=%[3]q)", name, v, cmd.Name)
138 return v
139 }
140
141 tracef("time.Time NOT available for flag name %[1]q (cmd=%[2]q)", name, cmd.Name)
142 return time.Time{}
143}

Callers 3

TestCommand_TimestampFunction · 0.95
TestCommandInvalidNameFunction · 0.95

Calls 2

ValueMethod · 0.95
tracefFunction · 0.85

Tested by 3

TestCommand_TimestampFunction · 0.76
TestCommandInvalidNameFunction · 0.76