-
Notifications
You must be signed in to change notification settings - Fork 618
ArtifactVersion.CreateTime as float64 is ambiguous and non-idiomatic #685
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
attrs.Created is a time.Time, but this converts it to float64(attrs.Created.Unix()) for ArtifactVersion.CreateTime. That drops sub-second precision, and the bigger issue is that CreateTime probably shouldn’t be a float64 in the first place. time.Time would be more idiomatic, or int64 if this is intended to store a Unix timestamp.
adk-go/artifact/gcsartifact/service.go
Line 403 in b8eb8c5
| CreateTime: float64(attrs.Created.Unix()), |
ArtifactVersion: &artifact.ArtifactVersion{
Version: version,
CanonicalURI: canonicalURI,
CustomMetadata: customMeta,
CreateTime: float64(attrs.Created.Unix()),
MimeType: attrs.ContentType,
},
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working