Skip to content

Commit

Permalink
Merge pull request #260 from SputNikPlop/references
Browse files Browse the repository at this point in the history
fix: remove references to nothing
  • Loading branch information
Xemdo authored Aug 14, 2023
2 parents 2f6df3b + a5c36ad commit 09fd51c
Show file tree
Hide file tree
Showing 29 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion internal/events/trigger/retrigger_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestRefireEvent(t *testing.T) {
}))
defer ts.Close()

params := *&TriggerParameters{
params := TriggerParameters{
Event: "gift",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand Down
16 changes: 8 additions & 8 deletions internal/events/trigger/trigger_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestFire(t *testing.T) {
}))
defer ts.Close()

params := *&TriggerParameters{
params := TriggerParameters{
Event: "gift",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -42,7 +42,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "cheer",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -61,7 +61,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "follow",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -81,7 +81,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "cheer",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -100,7 +100,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "add-redemption",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -119,7 +119,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "add-reward",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -138,7 +138,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "transaction",
Transport: models.TransportWebhook,
IsAnonymous: false,
Expand All @@ -157,7 +157,7 @@ func TestFire(t *testing.T) {
a.Nil(err)
a.NotEmpty(res)

params = *&TriggerParameters{
params = TriggerParameters{
Event: "add-reward",
Transport: "potato",
IsAnonymous: false,
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/_template/_event_name_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -36,7 +36,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/authorization_grant/grant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -40,7 +40,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/authorization_revoke/revoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -40,7 +40,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
2 changes: 1 addition & 1 deletion internal/events/types/ban/ban.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
ban.EndsAt = endsAt
ban.IsPermanent = isPermanent

body := *&models.EventsubResponse{
body := models.EventsubResponse{
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven

switch params.Transport {
case models.TransportWebhook, models.TransportWebSocket:
body := *&models.RedemptionEventSubResponse{
body := models.RedemptionEventSubResponse{
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand Down
2 changes: 1 addition & 1 deletion internal/events/types/cheer/cheer_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven

switch params.Transport {
case models.TransportWebhook, models.TransportWebSocket:
body := *&models.EventsubResponse{
body := models.EventsubResponse{
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/drop/drop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -38,7 +38,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/follow_v1/follow_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -39,7 +39,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/follow_v2/follow_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -39,7 +39,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
4 changes: 2 additions & 2 deletions internal/events/types/gift/channel_gift_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -42,7 +42,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
2 changes: 1 addition & 1 deletion internal/events/types/goal/goal_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven
switch params.Transport {
case models.TransportWebhook, models.TransportWebSocket:

body := *&models.EventsubResponse{
body := models.EventsubResponse{
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Expand Down
8 changes: 4 additions & 4 deletions internal/events/types/goal/goal_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var user = "1234"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
ToUserID: user,
Description: "Twitch Subscriber Goal",
Transport: models.TransportWebhook,
Expand All @@ -36,7 +36,7 @@ func TestEventSub(t *testing.T) {
a.Equal(user, body.Event.BroadcasterUserID, "Expected from user %v, got %v", r.ToUser, body.Event.BroadcasterUserID)
a.Equal("Twitch Subscriber Goal", body.Event.Description, "Expected from goal type %v, got %v", "Twitch Subscriber Goal", body.Event.Type)

params = *&events.MockEventParameters{
params = events.MockEventParameters{
ToUserID: user,
Description: "Twitch Follower Goal",
Transport: models.TransportWebhook,
Expand All @@ -53,7 +53,7 @@ func TestEventSub(t *testing.T) {
a.Equal("channel.goal.progress", body.Subscription.Type, "Expected event type %v, got %v", "channel.goal.progress", body.Subscription.Type)
a.Equal(user, body.Event.BroadcasterUserID, "Expected from user %v, got %v", r.ToUser, body.Event.BroadcasterUserID)

params = *&events.MockEventParameters{
params = events.MockEventParameters{
ToUserID: user,
Description: "Twitch Follower Goal",
Transport: models.TransportWebhook,
Expand All @@ -76,7 +76,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: user,
Transport: "fake_transport",
Trigger: "unsubscribe",
Expand Down
8 changes: 4 additions & 4 deletions internal/events/types/hype_train/hype_train_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
ToUserID: toUser,
Transport: models.TransportWebhook,
Trigger: "hype-train-begin",
Expand All @@ -33,7 +33,7 @@ func TestEventSub(t *testing.T) {
a.Equal("channel.hype_train.begin", body.Subscription.Type, "Expected event type %v, got %v", "channel.hype_train.begin", body.Subscription.Type)
a.Equal(toUser, body.Event.BroadcasterUserID, "Expected to user %v, got %v", toUser, body.Event.BroadcasterUserID)

params = *&events.MockEventParameters{
params = events.MockEventParameters{
ToUserID: toUser,
Transport: models.TransportWebhook,
Trigger: "hype-train-progress",
Expand All @@ -50,7 +50,7 @@ func TestEventSub(t *testing.T) {
a.Equal("channel.hype_train.progress", body.Subscription.Type, "Expected event type %v, got %v", "channel.hype_train.progress", body.Subscription.Type)
a.Equal(toUser, body.Event.BroadcasterUserID, "Expected to user %v, got %v", toUser, body.Event.BroadcasterUserID)

params = *&events.MockEventParameters{
params = events.MockEventParameters{
ToUserID: toUser,
Transport: models.TransportWebhook,
Trigger: "hype-train-end",
Expand All @@ -71,7 +71,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
ToUserID: toUser,
Transport: "fake_transport",
Trigger: "hype-train-progress",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (e Event) GenerateEvent(params events.MockEventParameters) (events.MockEven

switch params.Transport {
case models.TransportWebhook, models.TransportWebSocket:
body := *&models.EventsubResponse{
body := models.EventsubResponse{
Subscription: models.EventsubSubscription{
ID: params.ID,
Status: params.SubscriptionStatus,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -40,7 +40,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
8 changes: 4 additions & 4 deletions internal/events/types/poll/poll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var toUser = "4567"
func TestEventSub(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -34,7 +34,7 @@ func TestEventSub(t *testing.T) {
a.NotEmpty(body.Event.EndsAt)
a.Empty(body.Event.EndedAt)

params = *&events.MockEventParameters{
params = events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -51,7 +51,7 @@ func TestEventSub(t *testing.T) {
a.NotEmpty(body.Event.EndsAt)
a.Empty(body.Event.EndedAt)

params = *&events.MockEventParameters{
params = events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: models.TransportWebhook,
Expand All @@ -72,7 +72,7 @@ func TestEventSub(t *testing.T) {
func TestFakeTransport(t *testing.T) {
a := test_setup.SetupTestEnv(t)

params := *&events.MockEventParameters{
params := events.MockEventParameters{
FromUserID: fromUser,
ToUserID: toUser,
Transport: "fake_transport",
Expand Down
Loading

0 comments on commit 09fd51c

Please sign in to comment.