-
Notifications
You must be signed in to change notification settings - Fork 725
Conversation
750259d
to
24069f9
Compare
resources/dynamodb-items.go
Outdated
|
||
func (i *DynamoDBTableItem) String() string { | ||
table := i.table.String() | ||
keyField := "" |
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.
afaik you could use: var keyField string
, but it is purely aesthetics.
I wonder if we should add some kind of warning that blacklisting a DynamoDB table would still delete all its items. Though maybe the pre-nuke output is enough. |
resources/dynamodb-items.go
Outdated
keyField := "" | ||
|
||
for _, value := range i.id { | ||
value := strings.Replace(value.String(), "\n", " ", -1) |
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.
You could just use strings.TrimSpace()
here.
resources/dynamodb-items.go
Outdated
for _, value := range i.id { | ||
value := strings.Replace(value.String(), "\n", " ", -1) | ||
keyFieldChars := []rune(value) | ||
keyField = string(keyFieldChars[8:(len(keyFieldChars) - 3)]) |
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.
Slicing around with strings really looks hacky. Also it's hard to understand, since I have no idea how the contents look like.
So why do you need to do that?
Does this help? https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/dynamodbattribute/#ConvertFrom
24069f9
to
fd03d8e
Compare
Applied minor updates to address the pull request comments |
resources/dynamodb-tables.go
Outdated
} | ||
|
||
func (n *DynamoDBNuke) ListTables() ([]Resource, error) { | ||
params := &dynamodb.ListTablesInput{} |
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.
this could be
resp, err := n.Service.ListTables(&dynamodb.ListTablesInput{})
because params
is not used in other places.
adds dynamodb-items nuking adds dynamodb-table nuking
fd03d8e
to
3e60ecd
Compare
@rebuy-de/prp-aws-nuke please review