As you know the relation between the current flowing through the inductor and the voltage drop across it is (if the inductance is time invariant):

combined with Kirchoff's voltage law we get:

this is a simple first order ODE, which can be easily solved...