Recently I have started studying German. I came across the phrase "Wie geht es Dir" which translates to How are you in English. I have read that Dir is used when an object is an indirect object. Could you tell me how "you" in this sentence is an indirect object?
The concept of "direct" and "indirect" objects doesn't apply in German. Instead, it has verb-specific valence frames which decide what arguments there can be and what case they take. The impersonal use of "gehen" occurs with a dative complement, but there isn't a generally valid construction that explains all uses of the dative.