Browse code

Cleanup duplication in daemon files

Signed-off-by: Bily Zhang <xcoder@tenxcloud.com>

mooncake authored on 2018/11/11 22:50:05
Showing 4 changed files
... ...
@@ -751,7 +751,7 @@ func (d *Driver) Cleanup() error {
751 751
 
752 752
 	// Note we don't return an error below - it's possible the files
753 753
 	// are locked. However, next time around after the daemon exits,
754
-	// we likely will be able to to cleanup successfully. Instead we log
754
+	// we likely will be able to cleanup successfully. Instead we log
755 755
 	// warnings if there are errors.
756 756
 	for _, item := range items {
757 757
 		if item.IsDir() && strings.HasSuffix(item.Name(), "-removing") {
... ...
@@ -456,7 +456,7 @@ func (d *Driver) Cleanup() error {
456 456
 
457 457
 	// Note we don't return an error below - it's possible the files
458 458
 	// are locked. However, next time around after the daemon exits,
459
-	// we likely will be able to to cleanup successfully. Instead we log
459
+	// we likely will be able to cleanup successfully. Instead we log
460 460
 	// warnings if there are errors.
461 461
 	for _, item := range items {
462 462
 		if item.IsDir() && strings.HasSuffix(item.Name(), "-removing") {
... ...
@@ -288,7 +288,7 @@ func newAWSLogsClient(info logger.Info) (api, error) {
288 288
 
289 289
 	sess, err := session.NewSession()
290 290
 	if err != nil {
291
-		return nil, errors.New("Failed to create a service client session for for awslogs driver")
291
+		return nil, errors.New("Failed to create a service client session for awslogs driver")
292 292
 	}
293 293
 
294 294
 	// attach region to cloudwatchlogs config
... ...
@@ -103,7 +103,7 @@ type LogReader interface {
103 103
 type LogWatcher struct {
104 104
 	// For sending log messages to a reader.
105 105
 	Msg chan *Message
106
-	// For sending error messages that occur while while reading logs.
106
+	// For sending error messages that occur while reading logs.
107 107
 	Err          chan error
108 108
 	producerOnce sync.Once
109 109
 	producerGone chan struct{}