Commit Graph

10 Commits

Author SHA1 Message Date
Samuel Karp 9cd67df5b2
timestamp: clarify doc for ParseTimestamp
Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-07-08 22:02:35 -07:00
Sebastiaan van Stijn 52c1a2fae8
gofmt GoDoc comments with go1.19
Older versions of Go don't format comments, so committing this as
a separate commit, so that we can already make these changes before
we upgrade to Go 1.19.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-08 19:56:23 +02:00
Sebastiaan van Stijn 48cfe3f087
Improve GetTimestamp parsing
`GetTimestamp()` "assumed" values it could not parse
to be a valid unix timestamp, and would use invalid
values ("hello world") as-is (even testing that
it did so).

This patch validates unix timestamp to be a valid
numeric value, and makes other values invalid.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-20 13:07:17 +02:00
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Daniel Nephin f7f101d57e Add gosimple linter
Update gometalinter

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-12 12:09:59 -04:00
Aaron.L.Xu 2859ce6a57 fix typo in api/types/time/timestamp.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-14 14:16:03 +08:00
allencloud 6fb05778ba fix nits in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-27 23:30:50 +08:00
Michael Crosby 91e197d614 Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00
David Calavera c7d811c816 Remove types and lib packages from the engine.
They live in github.com/docker/engine-api now.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:49:00 -05:00
David Calavera 27220ecc6b Move timeutils functions to the only places where they are used.
- Move time json marshaling to the jsonlog package: this is a docker
  internal hack that we should not promote as a library.
- Move Timestamp encoding/decoding functions to the API types: This is
  only used there. It could be a standalone library but I don't this
it's worth having a separated repo for this. It could introduce more
complexity than it solves.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-15 14:56:14 -05:00