Skip to content

Conversation

@Mryashbhardwaj
Copy link
Member

Proton PR: goto/proton#140

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it accidently commited ?

- mode: nullable
name: name
type: string
deprecation: null

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add unit test for deprecation is exists ?

if r.Deprecation != nil && len(r.Deprecation.Date) > 0 {
deprecationDate, err := time.Parse(time.DateOnly, r.Deprecation.Date)
if err != nil {
return nil, fmt.Errorf("error parsing deprivation Date, for resource: %s, expected_format: [YYYY-MM-DD], got: [%s], err: %w", r.Name, r.Deprecation.Date, err)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was some typo in the message

Suggested change
return nil, fmt.Errorf("error parsing deprivation Date, for resource: %s, expected_format: [YYYY-MM-DD], got: [%s], err: %w", r.Name, r.Deprecation.Date, err)
return nil, fmt.Errorf("error parsing deprecation Date, for resource: %s, expected_format: [YYYY-MM-DD], got: [%s], err: %w", r.Name, r.Deprecation.Date, err)

@Mryashbhardwaj Mryashbhardwaj changed the base branch from main-deprecated to main June 18, 2025 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants