Remove gogoproto.stdtime#6821
Conversation
f74304e to
96226d9
Compare
| } | ||
|
|
||
| // FromTimestamp creates time.Time from protobuf's Timestamp | ||
| func FromTimestamp(from *types.Timestamp) time.Time { |
There was a problem hiding this comment.
Note that protobuf/types already implements this: https://github.com/gogo/protobuf/blob/b03c65ea87cdc3521ede29f62fe3ce239267c1bc/types/timestamp.go#L88-L98
There's some validation there (which I didn't dig into yet), but the other case is a nil timestamp.
There was a problem hiding this comment.
Oh, how didn't I notice that. Let me fix.
| // ToTimestamp creates protobuf's Timestamp from time.Time | ||
| func ToTimestamp(from time.Time) *types.Timestamp { | ||
| return &types.Timestamp{ | ||
| Seconds: int64(from.Second()), |
There was a problem hiding this comment.
Note that protobuf/types does this as Seconds: from.Unix()
|
Build succeeded.
|
|
Build succeeded.
|
|
Build succeeded.
|
|
Build succeeded.
|
|
Build succeeded.
|
|
Looks like this needs a rebase, @kzys |
This commit removes gogoproto.stdtime, since it is not supported by Google's official toolchain (see containerd#6564). Signed-off-by: Kazuyoshi Kato <[email protected]>
|
@thaJeztah Thanks. Merged sandbox changes and removed stdtime from the new protos as well. |
|
Build succeeded.
|
This commit removes gogoproto.stdtime, since it is not supported by
Google's official toolchain
(see #6564).
Signed-off-by: Kazuyoshi Kato [email protected]