@@ -10,14 +10,14 @@ import (
1010
1111// Commander is a contract for an update command
1212type Commander interface {
13- // Command returns an update command string
13+ // Command builds the command
1414 Command () (string , error )
1515}
1616
1717// AddCommand is an add command
1818type AddCommand struct {
19- // CommitWithin option to add the document within the
20- // specified number of milliseconds
19+ // CommitWithin option to add the document within the specified
20+ // number of milliseconds
2121 CommitWithin int
2222 // Overwrite indicates if the unique key constraints should be
2323 // checked to overwrite previous versions of the same document
@@ -48,13 +48,13 @@ func (c AddCommand) Command() (string, error) {
4848 return "\" add\" " + ":" + string (b ), nil
4949}
5050
51- // DelByQryCommand is a delete by query command
52- type DelByQryCommand struct {
51+ // DeleteByQueryCommand is a delete-by- query command
52+ type DeleteByQueryCommand struct {
5353 Query string
5454}
5555
5656// Command formats delete by query command
57- func (c DelByQryCommand ) Command () (string , error ) {
57+ func (c DeleteByQueryCommand ) Command () (string , error ) {
5858 cmd := map [string ]interface {}{
5959 "query" : c .Query ,
6060 }
@@ -67,13 +67,13 @@ func (c DelByQryCommand) Command() (string, error) {
6767 return "\" delete\" " + ":" + string (b ), nil
6868}
6969
70- // DelByIDsCommand is a delete by list of ids command
71- type DelByIDsCommand struct {
70+ // DeleteByIDsCommand is a delete by list of ids command
71+ type DeleteByIDsCommand struct {
7272 IDs []string
7373}
7474
75- // Command formats delete by ids command
76- func (c DelByIDsCommand ) Command () (string , error ) {
75+ // Command builds the delete-by- ids command
76+ func (c DeleteByIDsCommand ) Command () (string , error ) {
7777 ids := []string {}
7878 for _ , id := range c .IDs {
7979 ids = append (ids , fmt .Sprintf ("%q" , id ))
0 commit comments