-
Notifications
You must be signed in to change notification settings - Fork 188
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
chore: Drop dependency on pointy #1953
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SampleSizeBIConnector: pointy.Int64(110), | ||
TransactionLifetimeLimitSeconds: pointy.Int64(300), | ||
NoTableScan: conversion.Pointer(false), | ||
OplogSizeMB: conversion.Pointer[int64](1000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it fail if [int64] is not specified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, OplogSizeMB is int64 and the literal 1000
is int so you need to provide the cast
CopyProtectionEnabled: conversion.Pointer(d.Get("copy_protection_enabled").(bool)), | ||
EncryptionAtRestEnabled: conversion.Pointer(d.Get("encryption_at_rest_enabled").(bool)), | ||
PitEnabled: conversion.Pointer(d.Get("pit_enabled").(bool)), | ||
RestoreWindowDays: conversion.Pointer(cast.ToInt(d.Get("restore_window_days"))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why it's not similar to other places, e.g. d.Get("restore_window_days").(int)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷 I'm just replacing the pointer, there seem sto be a combination of using cast and .int
all over
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccMongoDBAtlasProjectsConfigWithDS(projectName, orgID, | ||
[]*admin.TeamRole{ | ||
{ | ||
TeamId: conversion.StringPtr(acc.GetProjectTeamsIdsWithPos(0)), | ||
TeamId: conversion.StringPtr(acc.GetProjectTeamsIDsWithPos(0)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why Ids didn't fail the linter before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a newer linter locally which picks these now, it was a small drive by I didn't bother in trying to switch to your version of the linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this is great!
Description
Drop dependency on pointy and use
conversion.Pointer
instead