Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mutations #123

Open
javiyt opened this issue Jan 24, 2022 · 0 comments
Open

Fix mutations #123

javiyt opened this issue Jan 24, 2022 · 0 comments
Assignees
Labels
bug Something isn't working go Pull requests that update Go code

Comments

@javiyt
Copy link
Owner

javiyt commented Jan 24, 2022

[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.0" with checksum 3f3885f095059990c8fa9a9bc722a5c5
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.1" with checksum 796a913ad5de624dd4839fd159140588
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/bot/bot.go.2" with checksum 351bd1c5114c08fcbc129c8d36670325
[mutation] --- internal/bot/bot.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/bot/bot.go.3	2022-01-23 18:32:51.604922356 +0000
[mutation] @@ -183,7 +183,7 @@
[mutation]  	}
[mutation]  
[mutation]  	sort.Slice(cmd, func(i, j int) bool {
[mutation] -		return cmd[i].Text < cmd[j].Text
[mutation] +		return cmd[i].Text <= cmd[j].Text
[mutation]  	})
[mutation]  
[mutation]  	return cmd
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/bot/bot.go.3" with checksum b6304a15f708237377ae55390e4017c7
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.4" with checksum 3b743ab7abcf041bf243e850cc26700f
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.5" with checksum 296138df776d4945008569186c3a9acf
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.6" with checksum 490f97fff061a449e721e8e257d1a555
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/bot/bot.go.7" with checksum 6026b933a6a0dd8daf4405e590f9cd99
[mutation] --- internal/bot/bot.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/bot/bot.go.8	2022-01-23 18:32:54.020946041 +0000
[mutation] @@ -85,7 +85,7 @@
[mutation]  
[mutation]  func WithTwitterClient(tc TwitterClient) Option {
[mutation]  	return func(b *Bot) {
[mutation] -		b.tc = tc
[mutation] +		_, _ = b.tc, tc
[mutation]  	}
[mutation]  }
[mutation]  
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/bot/bot.go.8" with checksum 01079b8f9436efec4eba4f7df766c108
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.9" with checksum 866adbeb280fb4e9da7a0f1efe97d48e
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.10" with checksum 9a0a0325cee7429ad1bc19c35a9df08c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.11" with checksum 799355b620383628fa1f3d8e116c41a1
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.12" with checksum f256a97dc7cb59e64220ddbca5fd4cfe
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.13" with checksum 51fd99ec058c1561bdc6e08a2677de1a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.14" with checksum 26efb9fc5dd987a98a821ba3499cf34f
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/bot/bot.go.15" with checksum 84fced97cd761685ba5a6a7f503ee138
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.17" with checksum 9da7cd5e8d91b6aba341e410fc95252a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/bot.go.18" with checksum a9b9ecb05e3631ec16db7067be051747
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/filters.go.0" with checksum 87c245fb254dfe418a832f3fdb063351
[mutation] --- internal/bot/filters.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/bot/filters.go.1	2022-01-23 18:33:01.628981711 +0000
[mutation] @@ -20,7 +20,7 @@
[mutation]  	return func(m *TelegramMessage) {
[mutation]  		senderID, err := strconv.Atoi(m.SenderID)
[mutation]  		if err != nil {
[mutation] -			return
[mutation] +
[mutation]  		}
[mutation]  
[mutation]  		if !b.cfg.IsAdmin(senderID) {
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/bot/filters.go.1" with checksum 3439d469b5394fafdb0d9a8ebf574449
[mutation] --- internal/bot/filters.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/bot/filters.go.2	2022-01-23 18:33:02.180981908 +0000
[mutation] @@ -24,7 +24,7 @@
[mutation]  		}
[mutation]  
[mutation]  		if !b.cfg.IsAdmin(senderID) {
[mutation] -			return
[mutation] +
[mutation]  		}
[mutation]  
[mutation]  		f(m)
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/bot/filters.go.2" with checksum e8e10294caf0fdcfcec173b6f9457a03
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/filters.go.3" with checksum 58050d592f252ebc42cc5f6b378a054a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/filters.go.4" with checksum 01ca8226ffb3515b4b6a60398b440331
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.0" with checksum d0df982798db3bbd3da9bc90c5097824
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.1" with checksum cb6afa97226ae2607884ebd696e8cf64
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.2" with checksum 02ca37b8d912dede231de96740d23f37
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.3" with checksum 1762b541a79e8e5400510fd33e6370c0
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.4" with checksum ee43dd42746e5a7f1dc4e2a04bb76118
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.5" with checksum 3788de5a0f61398353b0697e9c333c2c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.6" with checksum 20b26b036044056542d09b54ff7bffc4
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.7" with checksum fe145773e4ae6d10f19fe7986ff13267
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.8" with checksum 50ec49e64e16405c33a95a1a24f8947c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.10" with checksum e6653e4c165e27b59dafb6a7d3c6a84e
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.11" with checksum ddc4dbfce40370242c877d91acb08a8f
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/bot/handlers.go.12" with checksum 9b404f03148d04d0357b8f9c5ce75e0b
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/config/config.go.0" with checksum 564504daae067797b1f467c400533bec
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/config/config.go.1" with checksum ef6d183175f8a2371ed2f7273f698c77
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.0	2022-01-23 18:33:15.961505987 +0000
[mutation] @@ -35,7 +35,7 @@
[mutation]  func (hm *Manager) StopNotifications(ctx context.Context) {
[mutation]  	messages, err := hm.q.Subscribe(ctx, pubsub.CommandTopic.String())
[mutation]  	if err != nil {
[mutation] -		return
[mutation] +
[mutation]  	}
[mutation]  
[mutation]  	go func() {
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.0" with checksum 123d7c952e283b6e1c4a1039275d27d4
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.1	2022-01-23 18:33:16.173542137 +0000
[mutation] @@ -42,10 +42,8 @@
[mutation]  		for msg := range messages {
[mutation]  			var m pubsub.CommandEvent
[mutation]  			if err := easyjson.Unmarshal(msg.Payload, &m); err != nil {
[mutation] -				SendError(hm.q, err)
[mutation] -				msg.Ack()
[mutation] +				_, _, _ = hm.q, err, msg.Ack
[mutation]  
[mutation] -				continue
[mutation]  			}
[mutation]  
[mutation]  			if m.Command == pubsub.StopCommand {
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.1" with checksum 596e55128b1a8407a7610ee34825ae9d
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.2" with checksum 30abb07b1adb54297c7f543278268f04
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.3	2022-01-23 18:33:16.489596021 +0000
[mutation] @@ -51,7 +51,7 @@
[mutation]  			if m.Command == pubsub.StopCommand {
[mutation]  				for i := range hm.hs {
[mutation]  					if m.Handler == hm.hs[i].ID() || m.Handler == "" {
[mutation] -						hm.hs[i].StopNotifications()
[mutation] +
[mutation]  					}
[mutation]  				}
[mutation]  			}
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.3" with checksum 7ce6097ecf582475612646cbd5ef2b25
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.4	2022-01-23 18:33:16.657624668 +0000
[mutation] @@ -50,7 +50,7 @@
[mutation]  
[mutation]  			if m.Command == pubsub.StopCommand {
[mutation]  				for i := range hm.hs {
[mutation] -					if m.Handler == hm.hs[i].ID() || m.Handler == "" {
[mutation] +					if false || m.Handler == "" {
[mutation]  						hm.hs[i].StopNotifications()
[mutation]  					}
[mutation]  				}
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.4" with checksum de1c9cd16d1964de4b93940758fd02a4
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.5	2022-01-23 18:33:16.825653316 +0000
[mutation] @@ -50,7 +50,7 @@
[mutation]  
[mutation]  			if m.Command == pubsub.StopCommand {
[mutation]  				for i := range hm.hs {
[mutation] -					if m.Handler == hm.hs[i].ID() || m.Handler == "" {
[mutation] +					if m.Handler == hm.hs[i].ID() || false {
[mutation]  						hm.hs[i].StopNotifications()
[mutation]  					}
[mutation]  				}
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.5" with checksum 7b26abb08c6387105e5ec96234d9f2f2
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.6	2022-01-23 18:33:16.989656970 +0000
[mutation] @@ -28,8 +28,7 @@
[mutation]  	for _, v := range hm.hs {
[mutation]  		v.ExecuteHandlers(ctx)
[mutation]  	}
[mutation] -
[mutation] -	hm.StopNotifications(ctx)
[mutation] +	_, _ = hm.StopNotifications, ctx
[mutation]  }
[mutation]  
[mutation]  func (hm *Manager) StopNotifications(ctx context.Context) {
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.6" with checksum aaf9d550b4f140d42919c6c54c1e8e19
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.7	2022-01-23 18:33:17.153658519 +0000
[mutation] @@ -26,7 +26,7 @@
[mutation]  
[mutation]  func (hm *Manager) StartHandlers(ctx context.Context) {
[mutation]  	for _, v := range hm.hs {
[mutation] -		v.ExecuteHandlers(ctx)
[mutation] +		_, _ = v.ExecuteHandlers, ctx
[mutation]  	}
[mutation]  
[mutation]  	hm.StopNotifications(ctx)
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.7" with checksum c8254905308be3dc458dd13e73a0340e
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.8	2022-01-23 18:33:17.349660369 +0000
[mutation] @@ -55,8 +55,7 @@
[mutation]  					}
[mutation]  				}
[mutation]  			}
[mutation] -
[mutation] -			msg.Ack()
[mutation] +			_ = msg.Ack
[mutation]  		}
[mutation]  	}()
[mutation]  }
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.8" with checksum c2ec37813702b59f5ad77aab410a941b
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.9	2022-01-23 18:33:17.645663164 +0000
[mutation] @@ -42,7 +42,7 @@
[mutation]  		for msg := range messages {
[mutation]  			var m pubsub.CommandEvent
[mutation]  			if err := easyjson.Unmarshal(msg.Payload, &m); err != nil {
[mutation] -				SendError(hm.q, err)
[mutation] +				_, _ = hm.q, err
[mutation]  				msg.Ack()
[mutation]  
[mutation]  				continue
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.9" with checksum b9adb5a9c3428917f375c9e40b960c63
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.10	2022-01-23 18:33:17.813664750 +0000
[mutation] @@ -43,7 +43,7 @@
[mutation]  			var m pubsub.CommandEvent
[mutation]  			if err := easyjson.Unmarshal(msg.Payload, &m); err != nil {
[mutation]  				SendError(hm.q, err)
[mutation] -				msg.Ack()
[mutation] +				_ = msg.Ack
[mutation]  
[mutation]  				continue
[mutation]  			}
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.10" with checksum 8676b869ae14bc955f4396bcf748e2e3
[mutation] --- internal/handlers/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/handlers.go.12	2022-01-23 18:33:17.977666298 +0000
[mutation] @@ -63,5 +63,5 @@
[mutation]  
[mutation]  func SendError(q pubsub.Queue, err error) {
[mutation]  	eb, _ := easyjson.Marshal(pubsub.ErrorEvent{Err: err.Error()})
[mutation] -	_ = q.Publish(pubsub.ErrorTopic.String(), message.NewMessage(watermill.NewUUID(), eb))
[mutation] +	_, _, _, _, _ = q.Publish, pubsub.ErrorTopic.String, message.NewMessage, watermill.NewUUID, eb
[mutation]  }
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/handlers.go.12" with checksum 7c28bbc7642d1bd07e35a74ec8fc5cc8
[mutation] --- internal/handlers/error/handlers.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.0	2022-01-23 18:33:19.589681518 +0000
[mutation] @@ -24,7 +24,7 @@
[mutation]  func (eh *ErrorHandler) ExecuteHandlers(ctx context.Context) {
[mutation]  	messages, err := eh.q.Subscribe(ctx, pubsub.ErrorTopic.String())
[mutation]  	if err != nil {
[mutation] -		eh.log.Error(err)
[mutation] +		_, _ = eh.log.Error, err
[mutation]  	}
[mutation]  
[mutation]  	go func() {
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.0" with checksum f22eabc9e66a0d91449d7b8063f27a5c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.1" with checksum 41a48371d2b8afe58d1d45c7c1696d04
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.3" with checksum bfa85e578c0c18cd0e5a05f13eb85b64
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.4" with checksum 9789489905fb2aa554011b9f02a98e79
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.5" with checksum e00f84ad9e066d16f4a5a2658d0641e0
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/error/handlers.go.6" with checksum 1a45fdabf84af535de4c671347a84a60
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.0" with checksum 408194afd35839067a6651bd3e10303d
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.1" with checksum 36a026bc39793c2f63403a790f95c902
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.2" with checksum daa618d2c3972236a75e3aab0b7c858a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.3" with checksum 140e86b7505af67af3f6d26511a82408
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.4" with checksum 894b3b7ee2a6866acdcce74f6cca08a0
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.5" with checksum 7e00b13134c7fafc5fae8e7cec1bb7d3
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.6" with checksum 53420c0d09ddf9c425b7f23713c6fd9a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.7" with checksum 91abba82c59a715cca54662c6a49f82c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.8" with checksum b4f9dd8293dfdf4fee0940cefbd51761
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.9" with checksum c5ff7e09a191186a2e39aad27599c6ce
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.10" with checksum efde194e95d30fbfba6f75e08fafacb8
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.11" with checksum abd3757b5d10c22409e1a39abca1e48d
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.12" with checksum 01440732a1acb121db37b3ad111433d5
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.13" with checksum 7a5c948461d10b068f3cfe03d113b104
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.14" with checksum a846eb2e4c28bd8479807af761da6889
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.16" with checksum ce0f8b7b7b76fabaadcbee9651908e4d
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.17" with checksum 166761b19831be65b9f09b82be9e4435
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.18" with checksum aa34a68a82a2ca6604ad9d5877d4a361
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.19" with checksum 3f77ad26092a33824a9f59378f08c40f
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.22" with checksum 51a9c0a90895dec56231c5bc4d84952c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.23" with checksum b51b2f4915134f4fe2a35465b942780a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.24" with checksum 4127445fc28f7c6e6dd7bbf62f14d2bd
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/telegram/handlers.go.25" with checksum ce95b3087fadd7c8330d7171a61e4d83
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.0" with checksum 3673c6a03799de0d9451031826426eb1
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.1" with checksum e92653dc4a4f14c55efa1c24f6b5dbac
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.2" with checksum 146fb46da0a0c1152e7b9f155ad47d68
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.3" with checksum 79ae72ee3ac6fdb021dea96bd4f243b5
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.4" with checksum 55a98100779942a3934ed978564ca99c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.5" with checksum 9205a208c94ed4389359662fe06dde15
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.6" with checksum 7bae2ad4b8fadb12ad69b3baf21dd78b
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.7" with checksum 259296a38bdcfa1858ff63ce5ec56ccf
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.8" with checksum 472aa7b3dcc403c0556d5135f31e3f6e
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.9" with checksum 782e057279555a3d7197cf589b7b153f
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.10" with checksum c9c4d51ef149b4889f90deab5a60fe29
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.11" with checksum a182966bf84f059d9ec8d290307213eb
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.12" with checksum dda514200ee2c2ec302d4b3b8d90dbe6
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.13" with checksum 496f12fddc5547879283020ef7b312eb
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.15" with checksum aac711b7d8335a47a0870197eaed62cf
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.16" with checksum 9159ff043deafcf36f5687a4b30416fe
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.17" with checksum 981c730056838aa66557b22e26c9dd0b
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.18" with checksum 1b01521c0c3bc442fd47ecdb2cc80dae
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.21" with checksum b97881fb3466303e0a3087c18bf37e11
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.22" with checksum e90a6f1394b61474fc4bc9e28c63f563
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.23" with checksum f041a79215ed8d6fc973ea570a31c5a4
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/handlers/twitter/handlers.go.24" with checksum 3d50ed4561569385b5ccb6e6d31a2e9c
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.0" with checksum 6a0b2b1e40eeb429b658e19ad84b2702
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.1" with checksum 38425899a3ee94e67bfcdf0513f34350
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/twitter/client.go.2" with checksum 19de3bc55f21eb501cb0316190506941
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.3" with checksum b4c97d4e38048e270cc7f74ee364096a
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.4" with checksum af5e059b8c1596b14e40d4c69378e6d7
[mutation] SKIP "/tmp/go-mutesting-2527556956/internal/twitter/client.go.5" with checksum 7cdc2675088920f83c3670d8dc58a534
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.6	2022-01-23 18:34:49.874165480 +0000
[mutation] @@ -88,7 +88,8 @@
[mutation]  
[mutation]  func (c *Client) chunks(s string, chunkSize int) []string {
[mutation]  	if chunkSize >= len(s) {
[mutation] -		return []string{s}
[mutation] +		_ = s
[mutation] +
[mutation]  	}
[mutation]  
[mutation]  	chunks := make([]string, 0, (len(s)-1)/chunkSize+1)
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.6" with checksum 16b53e29f81e1261846ec92d78a83270
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.7" with checksum bbd106dc38fcb11962e9df9271619b53
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.8	2022-01-23 18:34:50.850172961 +0000
[mutation] @@ -58,7 +58,7 @@
[mutation]  
[mutation]  	var replyToID int64
[mutation]  	for _, ts := range c.chunks(s, tweetMaxLength-len(joinString)) {
[mutation] -		if replyToID > 0 {
[mutation] +		if replyToID >= 0 {
[mutation]  			params.InReplyToStatusID = replyToID
[mutation]  		}
[mutation]  
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.8" with checksum 36147d8fb67eb5b5cb25b223969bdb5b
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.9	2022-01-23 18:34:51.322176579 +0000
[mutation] @@ -87,7 +87,7 @@
[mutation]  }
[mutation]  
[mutation]  func (c *Client) chunks(s string, chunkSize int) []string {
[mutation] -	if chunkSize >= len(s) {
[mutation] +	if chunkSize > len(s) {
[mutation]  		return []string{s}
[mutation]  	}
[mutation]  
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.9" with checksum d845cc68e09b140e0b8548ad0b1acc23
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.10	2022-01-23 18:34:51.806180288 +0000
[mutation] @@ -30,7 +30,7 @@
[mutation]  func (c *Client) SendUpdateWithPhoto(s string, pic []byte) error {
[mutation]  	uploadResult, resp, err := c.tc.Media.Upload(pic, http.DetectContentType(pic))
[mutation]  
[mutation] -	defer func() { _ = resp.Body.Close() }()
[mutation] +	defer func() { _ = resp.Body.Close }()
[mutation]  
[mutation]  	if err != nil {
[mutation]  		buf := new(strings.Builder)
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.10" with checksum 1c161117f4b9b3424195b997d23e589a
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.11	2022-01-23 18:34:52.294184029 +0000
[mutation] @@ -34,7 +34,7 @@
[mutation]  
[mutation]  	if err != nil {
[mutation]  		buf := new(strings.Builder)
[mutation] -		_, _ = io.Copy(buf, resp.Body)
[mutation] +		_, _, _ = io.Copy, buf, resp.Body
[mutation]  
[mutation]  		return fmt.Errorf(
[mutation]  			"error sending status update: %w. Response status code: %v and body: %s",
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.11" with checksum ab7c47705d5d7147794096a4a996b32f
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.12" with checksum aab54984e8c09298c7a64c022ae38c33
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.15	2022-01-23 18:34:53.250191356 +0000
[mutation] @@ -69,7 +69,7 @@
[mutation]  		tweet, resp, err := c.tc.Statuses.Update(ts, params)
[mutation]  		if err != nil {
[mutation]  			buf := new(strings.Builder)
[mutation] -			_, _ = io.Copy(buf, resp.Body)
[mutation] +			_, _, _ = io.Copy, buf, resp.Body
[mutation]  			_ = resp.Body.Close()
[mutation]  
[mutation]  			return fmt.Errorf(
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.15" with checksum 58f70fb14d19f546478b1a211b56244b
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.16	2022-01-23 18:34:53.730195035 +0000
[mutation] @@ -70,7 +70,7 @@
[mutation]  		if err != nil {
[mutation]  			buf := new(strings.Builder)
[mutation]  			_, _ = io.Copy(buf, resp.Body)
[mutation] -			_ = resp.Body.Close()
[mutation] +			_ = resp.Body.Close
[mutation]  
[mutation]  			return fmt.Errorf(
[mutation]  				"error sending status update: %w. Response status code: %v and body: %s",
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.16" with checksum 493f827e19bf923d8955e7734db57c43
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.17" with checksum c1149b72a3e99fd40da54f85d6e5fc74
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.18" with checksum cc1c586ac2ad9d7e6c16f18b7b22c3ef
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.19" with checksum 45e11a91bab9e4ba272514c0f8f06a62
[mutation] --- internal/twitter/client.go	2022-01-23 18:32:21.016627963 +0000
[mutation] +++ /tmp/go-mutesting-2527556956/internal/twitter/client.go.20	2022-01-23 18:34:55.650209752 +0000
[mutation] @@ -98,7 +98,8 @@
[mutation]  	for i := range s {
[mutation]  		if currentLen == chunkSize {
[mutation]  			chunks = append(chunks, s[currentStart:i])
[mutation] -			currentLen = 0
[mutation] +			_ = currentLen
[mutation] +
[mutation]  			currentStart = i
[mutation]  		}
[mutation]  		currentLen++
[mutation] 
[mutation] FAIL "/tmp/go-mutesting-2527556956/internal/twitter/client.go.20" with checksum 014f3f8d4ec540d30f455b66d9a7cb80
[mutation] PASS "/tmp/go-mutesting-2527556956/internal/twitter/client.go.21" with checksum 700e5f19287975ae50d1f61c10fe206d
[mutation] The mutation score is 0.741667 (89 passed, 24 failed, 14 duplicated, 7 skipped, total is 120)
@javiyt javiyt added bug Something isn't working go Pull requests that update Go code labels Jan 24, 2022
@javiyt javiyt self-assigned this Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code
Projects
None yet
Development

No branches or pull requests

1 participant