Permalink
Browse files

Use square brackets for attributes in code example.

  • Loading branch information...
greghendershott committed Aug 27, 2012
1 parent 2a6a46f commit ba17256c011e3df9fdf87914fe37eb0ed2af9e82
Showing with 11 additions and 12 deletions.
  1. +5 −5 examples/backup.rkt
  2. +6 −7 manual.scrbl
View
@@ -1,6 +1,6 @@
#lang racket
-;; Use Glacier for archival backups, and SDB to store the meta data.
+;; Use Glacier for archival backups, and SDB to store the metadata.
(require (planet gh/aws/sdb)
(planet gh/aws/sns)
@@ -33,13 +33,13 @@
(printf "Updating Amazon Simple Database with metadata ...\n")
(put-attributes path->archive-domain
path/string
- `((ArchiveId ,archive-id)))
+ `([ArchiveId ,archive-id]))
;; Also store some info about this specific archive.
(put-attributes archive->meta-domain
archive-id
- `((Size ,(number->string (file-size path)))
- (Date ,(seconds->gmt-8601-string))
- (Path ,path/string)))
+ `([Size ,(number->string (file-size path))]
+ [Date ,(seconds->gmt-8601-string)]
+ [Path ,path/string]))
(void))
(define/contract (archive-directory path [sns-topic #f])
View
@@ -1671,7 +1671,7 @@ This example can be found in @tt{examples/backup.rkt}.
@codeblock{
#lang racket
-;; Use Glacier for archival backups, and SDB to store the meta data.
+;; Use Glacier for archival backups, and SDB to store the metadata.
(require (planet gh/aws/sdb)
(planet gh/aws/sns)
@@ -1704,13 +1704,13 @@ This example can be found in @tt{examples/backup.rkt}.
(printf "Updating Amazon Simple Database with metadata ...\n")
(put-attributes path->archive-domain
path/string
- `((ArchiveId ,archive-id)))
+ `([ArchiveId ,archive-id]))
;; Also store some info about this specific archive.
(put-attributes archive->meta-domain
archive-id
- `((Size ,(number->string (file-size path)))
- (Date ,(seconds->gmt-8601-string))
- (Path ,path/string)))
+ `([Size ,(number->string (file-size path))]
+ [Date ,(seconds->gmt-8601-string)]
+ [Path ,path/string]))
(void))
(define/contract (archive-directory path [sns-topic #f])
@@ -1734,8 +1734,7 @@ This example can be found in @tt{examples/backup.rkt}.
(define sns-topic (match (list-topics) [(list x rest ...) x][else #f]))
(archive-directory root-dir sns-topic)
-;; Let's look at the information from SDB, including what
-;; we just wrote.
+;; Let's look at the information from SDB
(select-hash (format "SELECT * FROM ~a" path->archive-domain))
(select-hash (format "SELECT * FROM ~a" archive->meta-domain))
}

0 comments on commit ba17256

Please sign in to comment.