func handleRemove(subject string) { fmt.Println("Remove admin", subject) var client *dynamodb.DynamoDB = dbutil.CreateDynamoDBClient() params := &dynamodb.DeleteItemInput{ TableName: aws.String(ddl.AdminTableName), Key: map[string]*dynamodb.AttributeValue{ "AdminID": {S: aws.String(subject)}, }, } _, err := client.DeleteItem(params) if err != nil { fmt.Println(err.Error()) return } }
func deleteItem(db *dynamodb.DynamoDB) error { var _, err = db.DeleteItem(deleteItemInput()) return err }