What is Gauss's Law in two dimensions? I am trying to figure out how the equation for the field if a Gaussian surface was applied to a 2D plane. I did see another question already asked on the subject, but I didn't get a particular explanation and the question was a couple of years ago. 
So - if I draw the 2D version of a Gaussian sphere (a circle) around a charge, and use the analog of Gauss' law as Flux = (Field)(Circumference), then I know what I have on the left hand side of the equation, namely, $E(2\pi r)$, but I'm not sure what I must equate this to in order to get the relation $E = q/r$ which is apparently what I'm looking for.
EDIT:
Here is the link to the other Phys.SE question:
Electric field and electric potential of a point charge in 2D and 1D
The answer by the user 'user1504' describes how $E(2\pi r)$ = $2\pi q$.
I don't understand how the expression $2\pi q$ on the right hand side of the equation was arrived at.
 A: Gauss law in 2D would have to be:
$$\oint \mathbf{E} \cdot \mathbf{\hat{n}} dl = 2 \pi q$$
because you are reducing your surface in 3D to a line in 2D, and keep the idea of measure of the boundary and its orthogonal direction or normal.
To get the expression of the field you have to make use of the fact that the electric field is isotropic. In other words, the anisotropies of the field are only due to anisotropies of the charge distribution, and thus for a point charge the field is the same at certain distance regardless of the direction.
So for a point charge, if we chose a circle of radius $R$ as the 2D boundary, the electrostatic field will be the same in any point of the circumference:
$$\oint \mathbf{E} \cdot \mathbf{\hat{n}} dl = \oint E_n dl = E_n \oint dl =2 \pi R E_n = 2 \pi q$$
hence
$$E_n= \frac{q}{R}$$
where $R$ has no particular fixed value, since we could have chosen a  circle with any value of $R$. And $E_n$ is rigorously the component in the direction normal to the circumference in certain point, which is along the radial direction. 
A final consideration, based on the fact that a point charge always interacts along the radial line (i.e. no "sideways" force is produced) allows us to affirm that there is no other component to $\mathbf{E}$ apart from $E_n$, and we can write:
$$\mathbf{E} = \frac{q}{r} \mathbf{\hat r}$$ 
A: The closest analogue to Gauss' law in 2 dimensions is Stokes Theorem:
$$∫Cv⃗ ⋅ds=∫∫S\delta⋅dS⃗ $$
where $C$ is the boundary of the surface $S$. If $S$ is in the $xy$-plane, that is Green's Theorem. All of those are special cases of the generalized Stoke's theorem:
$$∫Mdω=∫∂Mω$$
where $ω$ is a differential form on the simply connected manifold $M$, $dω$ is the differential of $ω$, and $∂M$ is the boundary of $M$.
