The following piece of code works well when they are within the same page:-
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) client, err :=