I'm no dog trainer, but my advice is to always scold bad behavior. Secondly get someone to assist you with a small dog and have them walk by a few times.
Scold/talk to your dog before he exhibits the bad behavior. Get him to understand tantrums are not allowed. Give him a treat when he does not bark at the passing dog. Scold him when he does bark. Its OK for him to be in alert mode when a dog goes by , however its not OK to be in maniac mode. Attempt to get him to understand. Work with him and anticipate the bad behavior. Scold him immediately before the tantrum starts. Get the dog to make the connection using treats and scolding.
Behaviors can be established with treats. Treats are the key to communicating with a dog. That is my official amature dog behavior lesson. Hope it helps.
As to someone walking their dog with a gun ready to shoot another dog.
All I can say is: Really ?!.