The government can have a legitimate function in a gold money system and that is to buy and sell gold at a given price that never changes and to run its own operations such that the government doesn’t get behind the 8-ball with gold i.e. doesn’t run a debt.
—and forget silver; that can be done. Of course, the price of silver will be even more erratic so we’d have to forget about using silver in coins. The big problem though is that the price of copper, oil, food, everything else would also swing wildly. That was the problem with the gold peg, crazy prices.