blog

mihalis's picture

Go Systems Programming book FAQ

1. Does the book have a web page?
Yes: https://www.packtpub.com/networking-and-servers/go-systems-programming

2. Is it a book for amateur programmers?
If you already know how to program, then you will not have any difficulties reading the book.

3. Which Go version should I have?
Any Go version will do. However, there are some specific Go features that need a recent Go version (1.8 or newer).

4. Where can I find the code for the book?
https://github.com/PacktPublishing/Go-Systems-Programming

5. Is it for UNIX only?
The book is mainly for UNIX machines, which includes Linux, macOS, Mac OS X, *BSD, etc. However, most of the code should work fine on Windows machines.

6. Where can I buy it?
Everywhere including https://www.packtpub.com/networking-and-servers/go-systems-programming, https://www.amazon.co.uk/Go-Systems-Programming-Master-programming/dp/17... and https://www.amazon.com/Go-Systems-Programming-Master-programming/dp/1787....

7. Is it possible to contact you about the book?
Yes – use the contact form (http://www.mtsoukalos.eu/contact) or Twitter (https://twitter.com/mactsouk).

8. What are you doing now?
I am currently writing another book on Go!

9. Have more questions?
Contact me using http://www.mtsoukalos.eu/contact.

mihalis's picture

Using tar

This blog post will try to show you how to use the tar utility.

Look at the contents of the code directory:

$ ls -l code/
total 24
-rw-r--r--@ 1 mtsouk staff 50 Nov 16 18:12 generatePassword.go
-rw-r--r--@ 1 mtsouk staff 50 Nov 16 18:12 randomNumbers.go
-rw-r--r--@ 1 mtsouk staff 50 Nov 16 18:12 stack.go

You can create a new tar file as follows:

$ tar zcvf code.tar.gz code
a code
a code/generatePassword.go
a code/randomNumbers.go
a code/stack.go
$ ls -l code.tar.gz
-rw-r--r-- 1 mtsouk staff 494 Nov 24 22:38 code.tar.gz

The preceding file is also compressed using the gzip utility because of the z option.
You can list the contents of an existing tar file (t) as follows:

$ tar ztvf code.tar.gz
drwxr-xr-x 0 mtsouk staff 0 Nov 10 20:32 code/
-rw-r--r-- 0 mtsouk staff 50 Nov 16 18:12 code/generatePassword.go
-rw-r--r-- 0 mtsouk staff 50 Nov 16 18:12 code/randomNumbers.go
-rw-r--r-- 0 mtsouk staff 50 Nov 16 18:12 code/stack.go

You can extract (x) an existing tar file as follows:

$ tar zxvf code.tar.gz
x code/
x code/generatePassword.go
x code/randomNumbers.go
x code/stack.go

Tags: 
mihalis's picture

Why I write

As you might have noticed, I write a lot and there are many reasons that I do so:

  • I like the writing process!
  • I enjoy writing, especially when I finish writing about a topic.
  • When I write about something, I learn more things about it.
  • I like helping other people learn new things.
  • Although writing is not an easy task, It feels natural to me after so many years. However, it was not that easy in the beginning.

One more thing that I forgot to mention: from time to time I read my writings!

Tags: 
mihalis's picture

Go Systems Programming TOC

1: GETTING STARTED WITH GO AND UNIX SYSTEMS PROGRAMMING
2: WRITING PROGRAMS IN GO
3: ADVANCED GO FEATURES
4: GO PACKAGES, ALGORITHMS, AND DATA STRUCTURES
5: FILES AND DIRECTORIES
6: FILE INPUT AND OUTPUT
7: WORKING WITH SYSTEM FILES
8: PROCESSES AND SIGNALS
9: GOROUTINES - BASIC FEATURES
10: GOROUTINES - ADVANCED FEATURES
11: WRITING WEB APPLICATIONS IN GO
12: NETWORK PROGRAMMING

You can get an even more detailed TOC at https://www.packtpub.com/networking-and-servers/go-systems-programming

mihalis's picture

Source code of Go Systems Programming

You can find the Go code of the "Go Systems Programming" book at https://github.com/PacktPublishing/Go-Systems-Programming

Image: 

Pages

Subscribe to RSS - blogs