abujehad139 / google-api-go-client

Automatically exported from code.google.com/p/google-api-go-client
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Can't set ChannelSectionSnippet.Position to 0 #62

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Try to insert/update a youtube section with a Position of 0
2. The ChannelSectionSnippet.Position will be omitted in the request's body
3. The section will then be inserted last on the channel's index

Because Go treats an int64 default value (0) and a manually set 0 value all the 
same, the `json:"omitempty"` tag will not integrate the Position in the 
request's body.

If you remove the "omitempty" tag, you'll be able to insert the sections in the 
first position but you'll lose the ability to insert it last.

I am using the build of June 11, 2014 rev c99e2061b8c6.

Original issue reported on code.google.com by quentin....@base79.com on 19 Jun 2014 at 8:46