When I run "go test", I want to use a different configuration file. How do I know within my code if I'm running within a test context or a normal context? Is there some sort of environment variable to check?


Question: Triac circuit confusion
Answer: The circuit attached to the primary of the transformer is a phase chopper or "dimmer" which would reduce the power the transformer is getting (and thus delivering to the load) according to the selected value of the variable resistance.

The way a phase chopper works is delaying when the triac turns on each cycle, the variable resistor charges the capacitor until it reaches the breakdown voltage of the diac and then the triac turns on.