Just started to learn GO. Need to add rule into iptables. Thats how i read ip from client
func get_client_ip(w http.ResponseWriter, r *http.Request) {
ip,_,_ := net.SplitHostPort(r.RemoteAddr)
}
I need use "ip" variable here
cmd := exec.Command("iptables", "-I INPUT -s ip -j ACCEPT")
What is the right way to use variables in os/exec ?