google-api-go-client: drive/v3 - remove file properties or appProperties

44 views
Skip to first unread message

Sylvain Rouquette

unread,
Apr 27, 2017, 8:50:40 AM4/27/17
to golang-nuts
Hello,

I'm using the google drive api v3 for Go to send requests (update), and I'm trying to remove appProperties I created on a file.

Here is the comment from drive-gen.go:
type File struct {
// AppProperties: A collection of arbitrary key-value pairs which are
// private to the requesting app.
// Entries with null values are cleared in update and copy requests.
AppProperties map[string]string `json:"appProperties,omitempty"`

I guess this comment is a copy from other implementation, since you can't nil a string in Go, or maybe it means that if appProperties is nil, it is completely removed.

I tried to use NullFields and ForceSendFields, but based on the implementation, it seems to only works on keys (like appProperties) in the file when it is serialized, and it doesn't parse recursively.

Is there a way to remove a property?

"This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately"

Sylvain Rouquette

unread,
Apr 27, 2017, 9:55:42 AM4/27/17
to golang-nuts
I don't think there is a solution with the current implementation, I reported the bug.
Reply all
Reply to author
Forward
0 new messages