Calculate $\lim_{x\to a}(2-\frac{x}{a} )^{\tan( \frac{\pi x}{2a})}$ 
I would like to calculate 
  $$\lim\limits_{x\to a}\left(2-\dfrac{x}{a} \right)^{\tan\left( \dfrac{\pi x}{2a}\right)},\quad a \in\mathbb{R}^* \,\,\text{fixed} $$

we've 
$$\left(2-\dfrac{x}{a} \right)^{\tan\left( \dfrac{\pi x}{2a}\right)}=e^{\tan\left( \dfrac{\pi x}{2a}\right)\ln\left(2-\dfrac{x}{a} \right)}.$$
Note that:
$$\ln\left(2-\dfrac{x}{a} \right)\sim_{a}1-\dfrac{x}{2}.$$
Now we have $\dfrac{\pi x}{2a}\underset{x\to a}{\longrightarrow} \dfrac{\pi}{2}$, i.e.$\dfrac{\pi x}{2a}-\dfrac{\pi}{2}  \underset{x\to a}{\longrightarrow} 0$ and $\tan h \sim_{0}h.$
I'm stuck.
Update: here is another way :
\begin{aligned}
\left(2-\dfrac{x}{a} \right)^{\tan\left( \dfrac{\pi x}{2a}\right)}&=\exp\left[{\tan\left( \dfrac{\pi x}{2a}\right)\ln\left(2-\dfrac{x}{a} \right)}\right].\\
&=\exp\left[ \left(1-\dfrac{x}{a}\right)\tan\left(\dfrac{\pi x}{2a}-\dfrac{\pi}{2}+\dfrac{\pi}{2} \right).\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{1-\dfrac{x}{a}}\right]\\
&=\exp\left[ -\dfrac{\left(1-\dfrac{x}{a} \right)}{\tan\left(\dfrac{\pi x}{2a}-\dfrac{\pi}{2} \right)}.\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{\left(1-\dfrac{x}{a}\right)}\right]\\
&=\exp\left[ -\dfrac{\left(1-\dfrac{x}{a} \right)}{\tan\left(-\dfrac{\pi}{2}\left(1-\dfrac{x}{a} \right)\right)}.\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{\left(1-\dfrac{x}{a}\right)}\right]\\
&=\exp\left[ \dfrac{2}{\pi} \dfrac{\dfrac{\pi}{2}\left(1-\dfrac{x}{a} \right)}{\tan\left(\dfrac{\pi}{2}\left(1-\dfrac{x}{a} \right)\right)}.\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{\left(1-\dfrac{x}{a}\right)}\right]\\
\end{aligned}
Thus 
$$\lim\limits_{x\to a}\left(2-\dfrac{x}{a} \right)^{\tan\left(\dfrac{\pi x}{2a}\right)}  =e^{\dfrac{2}{\pi}} $$


*

*Am i right beside i'm intersted in way which use equivalents


Hint:
$$\left(2-\frac xa\right)^{\tan(\pi x/2a)}=\left[\left(1+\left(1-\frac xa\right)\right)^{1/(1-x/a)}\right]^{(1-x/a)\tan(\pi x/2a)}\\\stackrel{x\to a}\longrightarrow e^{2/\pi}$$
Since,
$$e=\lim_{u\to0}(1+u)^{1/u}$$
$$\frac2\pi=\lim_{u\to1}(1-u)\tan(\pi u/2)$$
for those who want to make this rigorous, use squeeze theorem:
$$\underbrace{\left(2-\frac xa\right)^{\frac2\pi\left(\frac a{a-x}-1\right)}}_{\text{Laurent expansion of }\tan(z)\text{ at }z=\frac\pi2}\le\left(2-\frac xa\right)^{\tan(\pi x/2a)}\le\underbrace{e^{\left(1-\frac xa\right)\tan\left(\frac{\pi x}{2a}\right)}}_{\text{Maclaurin expansion of }e^x}$$
where the inequalities are true for $x<a$ and flipped for $x>a$.
