Skip to content

Commit

Permalink
updated to v2 mod (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
g8rswimmer authored Feb 26, 2022
1 parent 5ffb7bf commit 24d5964
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
12 changes: 6 additions & 6 deletions v2/client_tweet_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -943,26 +943,26 @@ func TestClient_TweetSearchStream(t *testing.T) {
},
},
wantSystem: []map[SystemMessageType]SystemMessage{
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Forced Disconnect: Too many connections. (Allowed Connections = 2)",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T18:12:52+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Invalid date format for query parameter 'fromDate'. Expected format is 'yyyyMMddHHmm'. For example, '201701012315' for January 1st, 11:15 pm 2017 UTC.\n\n",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Force closing connection to because it reached the maximum allowed backup (buffer size is ).",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
Expand Down
12 changes: 6 additions & 6 deletions v2/client_tweet_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,26 +104,26 @@ func TestClient_TweetSampleStream(t *testing.T) {
},
},
wantSystem: []map[SystemMessageType]SystemMessage{
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Forced Disconnect: Too many connections. (Allowed Connections = 2)",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T18:12:52+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Invalid date format for query parameter 'fromDate'. Expected format is 'yyyyMMddHHmm'. For example, '201701012315' for January 1st, 11:15 pm 2017 UTC.\n\n",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Force closing connection to because it reached the maximum allowed backup (buffer size is ).",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
Expand Down
3 changes: 3 additions & 0 deletions v2/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/g8rswimmer/go-twitter/v2

go 1.17
24 changes: 12 additions & 12 deletions v2/tweet_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,26 @@ func Test_StartTweetStreamSystem(t *testing.T) {
}(),
},
want: []map[SystemMessageType]SystemMessage{
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Forced Disconnect: Too many connections. (Allowed Connections = 2)",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T18:12:52+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Invalid date format for query parameter 'fromDate'. Expected format is 'yyyyMMddHHmm'. For example, '201701012315' for January 1st, 11:15 pm 2017 UTC.\n\n",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Force closing connection to because it reached the maximum allowed backup (buffer size is ).",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
Expand Down Expand Up @@ -239,26 +239,26 @@ func Test_StartTweetStream(t *testing.T) {
},
},
wantSystem: []map[SystemMessageType]SystemMessage{
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Forced Disconnect: Too many connections. (Allowed Connections = 2)",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T18:12:52+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Invalid date format for query parameter 'fromDate'. Expected format is 'yyyyMMddHHmm'. For example, '201701012315' for January 1st, 11:15 pm 2017 UTC.\n\n",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
return t
}(),
},
},
map[SystemMessageType]SystemMessage{
ErrorMessageType: SystemMessage{
{
ErrorMessageType: {
Message: "Force closing connection to because it reached the maximum allowed backup (buffer size is ).",
Sent: func() time.Time {
t, _ := time.Parse(time.RFC3339, "2017-01-11T17:04:13+00:00")
Expand Down

0 comments on commit 24d5964

Please sign in to comment.