what does this phrase mean?
That was a close one ! You had me going there for a minute I thought I was gonna
have to slap some sense into you。
what does ”had me going there for a minute“mean?and i dont really get the structure of "have sb going sw",so please help me out of here.

