Lipshitz continuity of gap boundaries for Hofstadter-like spectra