Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image: image.Deprecated is deprecated: The deprecation status associated with this image #767

Closed
bh7cw opened this issue Dec 3, 2020 · 2 comments

Comments

@bh7cw
Copy link

@bh7cw bh7cw commented Dec 3, 2020

golang-ci lint shows the error:

image.Deprecated is deprecated: The deprecation status associated with this image.  (staticcheck)

According to:

type Image struct {
	// ArchiveSizeBytes: Size of the image tar.gz archive stored in Google
	// Cloud Storage (in bytes).
	ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"`

	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
	// format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`

	// Deprecated: The deprecation status associated with this image.
	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`

Deprecated was supported, but it's deprecated now.

According to doc, deprecated is still supported.

How to check the deprecated status of image through api?

@codyoss
Copy link
Member

@codyoss codyoss commented Dec 3, 2020

Hey, thanks for the report. This field is not actually deprecated. staticcheck just reports it as such because the godoc starts with Deprecated:. It looks like our generator writes docs as (fieldname): (description) and the field name here happens to be Deprecated . The offending code lies here: https://github.com/googleapis/google-api-go-client/blob/master/google-api-go-generator/gen.go#L1359.

@bh7cw
Copy link
Author

@bh7cw bh7cw commented Dec 3, 2020

Hah, okay. Thank you for quick reply and clarification.

codyoss added a commit to codyoss/google-api-go-client that referenced this issue Dec 7, 2020
@codyoss codyoss closed this in #774 Dec 8, 2020
codyoss added a commit that referenced this issue Dec 8, 2020
Fixes: #767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants