Thank you for reading. I'm chinese. I have problem with rancher. I want to use golang to make a program that I can click one time to push image to the right place and restart the test environment.
I’m new hand to learn golang. I tried to use golang connect linux. But I can't do more works about it. I have no idea. I find a code from internet in China.
// connect to ssh
addr = fmt.Sprintf("%s:%d", host, port)
if client, err = ssh.Dial("tcp", addr, clientConfig); err != nil {
return nil, err
}
// create session
if session, err = client.NewSession(); err != nil {
return nil, err
}
return session, nil
I want to learn how to make the program or some people can provide golang write plugins to help me. Thanks again!