Decaying and decayless transverse oscillations of a coronal loop