MCPcopy Create free account
hub / github.com/awsdocs/aws-doc-sdk-examples / GetMovieName

Function GetMovieName

go/dynamodb/LoadTableItems/LoadTableItems.go:47–56  ·  view source on GitHub ↗

GetMovieName gets the name of the movie from an attribute value

(av map[string]*dynamodb.AttributeValue)

Source from the content-addressed store, hash-verified

45
46// GetMovieName gets the name of the movie from an attribute value
47func GetMovieName(av map[string]*dynamodb.AttributeValue) (string, error) {
48 var item Item
49
50 err := dynamodbattribute.UnmarshalMap(av, &item)
51 if err != nil {
52 return "", err
53 }
54
55 return item.Title, nil
56}
57
58// AddTableItem adds an item to an Amazon DynamoDB table
59// Inputs:

Callers 2

TestCreateTableFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCreateTableFunction · 0.68