The gold leaf electroscope is used to detect the presence of a charge and test the kind of charge.
This device consists of two thin strips of gold attached to a metal rod suspended inside a glass jar.
The opening of the jar is fitted with a rubber stopper, and the metal rod passes through it. The other end of the rod is attached to a disc made up of metal.
Some of the electroscopes instead of having gold strips have strips of silver, copper, or brass.
To test the charge of a body first the electroscope is charged with a body of known charge and then the body whose charge we want to find is brought in contact with the disk and if the gold leaves diverge from each other then the tested body has the same charge as previous body( known charge) and if the leaves come close to each other then the body has the opposite charge as that of the previous body.
Hence, the gold leaf electroscope can detect charge.