Hi, my name is Andrey Grehov and welcome to “Learn Go Programming Language From Scratch”. This series of articles is going to be a short course to get you comfortable programming Go. Go, also commonly referred to as golang, is a programming language developed at Google. It is a statically-typed language with syntax loosely derived from that of C. However, it is a new language across the board. In every respect the language was designed by thinking about what programmers do and how to make programming, at least the kind of programming we do, more effective, which means more fun.
In this article we’re going to write a simple program on Go (100 lines), which will execute commands via SSH protocol on hundreds of servers, and will do it quite efficiently. It will be implemented with the help of go.crypto/ssh, which is SSH protocol implementation by authors of Go. More “advanced” version of the program written in this article is available on github: GoSSHa (Go SSH agent). Introduction The company I work for has more than one server and in order to keep the work efficient libpssh library on the basis of libssh2 has been written.
The aim of this article is to tell about a programming language Go (Golang) to those developers, who are interested in it, but haven’t risked studying it. The story will be told on the basis of a real sentence that represents RESTful API web-service. I had a task to develop a backend to the mobile phone. The service is quite simple. It’s a mobile application, which shows posts of the users that are near the current location.