Skip to content

Commit

Permalink
Fix up unit tests for TransactWriteItems() example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Cheung committed Jan 6, 2021
1 parent c1916c7 commit be8f6c1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,22 @@ func GetName(id string) (*string, error) {

// GetName - example func using GetItem method
func GetTransactGetItems(id string) error {
parameter := &dynamodb.TransactWriteItemsInput{}
parameter := &dynamodb.TransactWriteItemsInput{
TransactItems: []*dynamodb.TransactWriteItem{
{
Put: &dynamodb.Put{
TableName: aws.String("my_table"),
},
},
},
}

_, err := Dyna.Db.TransactWriteItems(parameter)

if err != nil {
fmt.Print(err.Error())
return err
fmt.Print(err.Error())
return err
}

return nil
}
}

0 comments on commit be8f6c1

Please sign in to comment.