For an inhomogeneous quasilinear hyperbolic system of diagonal form, under the assumptions that the system is linearly degenerate and the $C^1$ norm of the boundary data is bounded, we show that the mechanism of the formation of singularities of $C^1$ classical solution to the Goursat problem with $C^1$ compatibility conditions at the origin must be an ODE type. The similar result is also obtained for the weakly discontinuous solution with $C^0$ compatibility conditions at the origin.