@@ -56,11 +56,12 @@ import (
5656)
5757
5858func main () {
59+ ctx := context.Background ()
60+
5961 s := dubgo.New (
6062 dubgo.WithSecurity (" DUB_API_KEY" ),
6163 )
6264
63- ctx := context.Background ()
6465 res , err := s.Links .Create (ctx, &operations.CreateLinkRequestBody {
6566 URL: " https://google.com" ,
6667 ExternalID: dubgo.String (" 123456" ),
@@ -93,11 +94,12 @@ import (
9394)
9495
9596func main () {
97+ ctx := context.Background ()
98+
9699 s := dubgo.New (
97100 dubgo.WithSecurity (" DUB_API_KEY" ),
98101 )
99102
100- ctx := context.Background ()
101103 res , err := s.Links .Upsert (ctx, &operations.UpsertLinkRequestBody {
102104 URL: " https://google.com" ,
103105 ExternalID: dubgo.String (" 123456" ),
@@ -231,11 +233,12 @@ import (
231233)
232234
233235func main () {
236+ ctx := context.Background ()
237+
234238 s := dubgo.New (
235239 dubgo.WithSecurity (" DUB_API_KEY" ),
236240 )
237241
238- ctx := context.Background ()
239242 res , err := s.Links .Create (ctx, &operations.CreateLinkRequestBody {
240243 URL: " https://google.com" ,
241244 ExternalID: dubgo.String (" 123456" ),
@@ -329,12 +332,13 @@ import (
329332)
330333
331334func main () {
335+ ctx := context.Background ()
336+
332337 s := dubgo.New (
333338 dubgo.WithServerURL (" https://api.dub.co" ),
334339 dubgo.WithSecurity (" DUB_API_KEY" ),
335340 )
336341
337- ctx := context.Background ()
338342 res , err := s.Links .Create (ctx, &operations.CreateLinkRequestBody {
339343 URL: " https://google.com" ,
340344 ExternalID: dubgo.String (" 123456" ),
@@ -407,11 +411,12 @@ import (
407411)
408412
409413func main () {
414+ ctx := context.Background ()
415+
410416 s := dubgo.New (
411417 dubgo.WithSecurity (" DUB_API_KEY" ),
412418 )
413419
414- ctx := context.Background ()
415420 res , err := s.Links .Create (ctx, &operations.CreateLinkRequestBody {
416421 URL: " https://google.com" ,
417422 ExternalID: dubgo.String (" 123456" ),
@@ -451,11 +456,12 @@ import (
451456)
452457
453458func main () {
459+ ctx := context.Background ()
460+
454461 s := dubgo.New (
455462 dubgo.WithSecurity (" DUB_API_KEY" ),
456463 )
457464
458- ctx := context.Background ()
459465 res , err := s.Links .Create (ctx, &operations.CreateLinkRequestBody {
460466 URL: " https://google.com" ,
461467 ExternalID: dubgo.String (" 123456" ),
@@ -498,6 +504,8 @@ import (
498504)
499505
500506func main () {
507+ ctx := context.Background ()
508+
501509 s := dubgo.New (
502510 dubgo.WithRetryConfig (
503511 retry.Config {
@@ -513,7 +521,6 @@ func main() {
513521 dubgo.WithSecurity (" DUB_API_KEY" ),
514522 )
515523
516- ctx := context.Background ()
517524 res , err := s.Links .Create (ctx, &operations.CreateLinkRequestBody {
518525 URL: " https://google.com" ,
519526 ExternalID: dubgo.String (" 123456" ),
@@ -553,11 +560,12 @@ import (
553560)
554561
555562func main () {
563+ ctx := context.Background ()
564+
556565 s := dubgo.New (
557566 dubgo.WithSecurity (" DUB_API_KEY" ),
558567 )
559568
560- ctx := context.Background ()
561569 res , err := s.Links .List (ctx, operations.GetLinksRequest {
562570 Page: dubgo.Float64 (1 ),
563571 PageSize: dubgo.Float64 (50 ),
0 commit comments