How can I change the code instead of showing it (fmt.Printf) to execute a command (exec.Command)
Now I have this:
// Print keys
fmt.Printf("%x %34s %34s ", padded, uaddr.EncodeAddress(), caddr.EncodeAddress())
How to give a variable value to 'g' and 'h':
v := "cmd"
n := "/C"
a := "testcmd"
b := "-connect=127.0.0.1"
c := "-port=3333"
d := "-user=username"
e := "-password=password"
f := "importaddress"
g := "AddressHere"
h := "MoreInfo"
z := exec.Command(v, n, a, b, c, d, e, f, g, h)
if err := z.Run(); err != nil {
fmt.Println("Error: ", err)
}
I need to give this variable valie:
h := fmt.Printf("%x
", padded)
g := fmt.Printf("%34s
", uaddr.EncodeAddress())
g := fmt.Printf("%34s
", caddr.EncodeAddress())
execute the command twice with different variables