Go Systems Programming

Learning the new system’s programming language for all Unix-type systems
Preview in Mapt

Go Systems Programming

Mihalis Tsoukalos

1 customer reviews
Learning the new system’s programming language for all Unix-type systems
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $39.99
Save 74%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Go Systems Programming Book Cover
Go Systems Programming
$ 39.99
$ 10.00
Robot Operating System Cookbook Book Cover
Robot Operating System Cookbook
$ 39.99
$ 10.00
Buy 2 for $20.00
Save $59.98
Add to Cart

Book Details

ISBN 139781787125643
Paperback466 pages

Book Description

Go is the new systems programming language for Linux and Unix systems. It is also the language in which some of the most prominent cloud-level systems have been written, such as Docker. Where C programmers used to rule, Go programmers are in demand to write highly optimized systems programming code.

Created by some of the original designers of C and Unix, Go expands the systems programmers toolkit and adds a mature, clear programming language. Traditional system applications become easier to write since pointers are not relevant and garbage collection has taken away the most problematic area for low-level systems code: memory management.

This book opens up the world of high-performance Unix system applications to the beginning Go programmer. It does not get stuck on single systems or even system types, but tries to expand the original teachings from Unix system level programming to all types of servers, the cloud, and the web.

Table of Contents

Chapter 1: Getting Started with Go and Unix Systems Programming
The structure of the book
What is systems programming?
About Go
Two useful Go tools
The various states of a Unix process
Exercises
Summary
Chapter 2: Writing Programs in Go
Compiling Go code
Go environment variables
Using command-line arguments
User input and output
Go functions
Go data structures
Interfaces
Creating random numbers
Exercises
Summary
Chapter 3: Advanced Go Features
Error handling in Go
Pattern matching and regular expressions
Reflection
Comparing Go to other programming languages
Analysing software
Unreachable code
Avoiding common Go mistakes
Exercises
Summary
Chapter 4: Go Packages, Algorithms, and Data Structures
About algorithms
Sorting algorithms
Linked lists in Go
Trees in Go
Developing a hash table in Go
About Go packages
Garbage collection
Your environment
Go gets updated frequently!
Exercises
Summary
Chapter 5: Files and Directories
Useful Go packages
Command-line arguments revisited!
Dealing with directories
Dealing with files in Go
Developing find(1) in Go
The first version of find(1)
Using regular expressions
Exercises
Summary
Chapter 6: File Input and Output
About file input and output
Useful I/O packages in Go
File I/O operations
Copying files in Go
Developing wc(1) in Go
Interprocess communication
Sparse files in Go
Reading and writing data records
File locking in Go
A simplified Go version of the dd utility
Exercises
Summary
Chapter 7: Working with System Files
Which files are considered system files?
Logging in Go
Putting data at the end of a file
About log files
More pattern matching examples
Searching files revisited
Date and time operations
Rotating log files
Creating good random passwords
Another Go update
Exercises
Summary
Chapter 8: Processes and Signals
About Unix processes and signals
Process management
Unix signals in Go
The kill(1) command
Improving file copying
Plotting data
Unix pipes in Go
Unix sockets in Go
RPC in Go
Programming a Unix shell in Go
Yet another minor Go update
Exercises
Summary
Chapter 9: Goroutines - Basic Features
About goroutines
The sync Go packages
Pipelines
A better version of wc.go
Exercises
Summary
Chapter 10: Goroutines - Advanced Features
The Go scheduler
The sync Go package
The select keyword
Signal channels
Buffered channels
About timeouts
Channels of channels
Nil channels
Shared memory
The dWC.go utility revisited
Detecting race conditions
About GOMAXPROCS
Exercises
Summary
Chapter 11: Writing Web Applications in Go
What is a web application?
About the net/http Go package
Developing web clients
A small web server
The html/template package
About JSON
Using MongoDB
A handy command-line utility
Exercises
Summary
Chapter 12: Network Programming
About network programming
The net Go standard package
Unix sockets revisited
Performing DNS lookups
Developing a simple TCP server
Developing a simple TCP client
Developing a simple UDP server
Developing a simple UDP client
A concurrent TCP server
Remote procedure call (RPC)
Exercises
Summary

What You Will Learn

  • Explore the Go language from the standpoint of a developer conversant with Unix, Linux, and so on
  • Understand Goroutines, the lightweight threads used for systems and concurrent applications
  • Learn how to translate Unix and Linux systems code in C to Golang code
  • How to write fast and lightweight server code
  • Dive into concurrency with Go
  • Write low-level networking code

Authors

Table of Contents

Chapter 1: Getting Started with Go and Unix Systems Programming
The structure of the book
What is systems programming?
About Go
Two useful Go tools
The various states of a Unix process
Exercises
Summary
Chapter 2: Writing Programs in Go
Compiling Go code
Go environment variables
Using command-line arguments
User input and output
Go functions
Go data structures
Interfaces
Creating random numbers
Exercises
Summary
Chapter 3: Advanced Go Features
Error handling in Go
Pattern matching and regular expressions
Reflection
Comparing Go to other programming languages
Analysing software
Unreachable code
Avoiding common Go mistakes
Exercises
Summary
Chapter 4: Go Packages, Algorithms, and Data Structures
About algorithms
Sorting algorithms
Linked lists in Go
Trees in Go
Developing a hash table in Go
About Go packages
Garbage collection
Your environment
Go gets updated frequently!
Exercises
Summary
Chapter 5: Files and Directories
Useful Go packages
Command-line arguments revisited!
Dealing with directories
Dealing with files in Go
Developing find(1) in Go
The first version of find(1)
Using regular expressions
Exercises
Summary
Chapter 6: File Input and Output
About file input and output
Useful I/O packages in Go
File I/O operations
Copying files in Go
Developing wc(1) in Go
Interprocess communication
Sparse files in Go
Reading and writing data records
File locking in Go
A simplified Go version of the dd utility
Exercises
Summary
Chapter 7: Working with System Files
Which files are considered system files?
Logging in Go
Putting data at the end of a file
About log files
More pattern matching examples
Searching files revisited
Date and time operations
Rotating log files
Creating good random passwords
Another Go update
Exercises
Summary
Chapter 8: Processes and Signals
About Unix processes and signals
Process management
Unix signals in Go
The kill(1) command
Improving file copying
Plotting data
Unix pipes in Go
Unix sockets in Go
RPC in Go
Programming a Unix shell in Go
Yet another minor Go update
Exercises
Summary
Chapter 9: Goroutines - Basic Features
About goroutines
The sync Go packages
Pipelines
A better version of wc.go
Exercises
Summary
Chapter 10: Goroutines - Advanced Features
The Go scheduler
The sync Go package
The select keyword
Signal channels
Buffered channels
About timeouts
Channels of channels
Nil channels
Shared memory
The dWC.go utility revisited
Detecting race conditions
About GOMAXPROCS
Exercises
Summary
Chapter 11: Writing Web Applications in Go
What is a web application?
About the net/http Go package
Developing web clients
A small web server
The html/template package
About JSON
Using MongoDB
A handy command-line utility
Exercises
Summary
Chapter 12: Network Programming
About network programming
The net Go standard package
Unix sockets revisited
Performing DNS lookups
Developing a simple TCP server
Developing a simple TCP client
Developing a simple UDP server
Developing a simple UDP client
A concurrent TCP server
Remote procedure call (RPC)
Exercises
Summary

Book Details

ISBN 139781787125643
Paperback466 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Building RESTful Web services with Go Book Cover
Building RESTful Web services with Go
$ 31.99
$ 10.00
Go Reactive Programming Book Cover
Go Reactive Programming
$ 39.99
$ 10.00
Go: Design Patterns for Real-World Projects Book Cover
Go: Design Patterns for Real-World Projects
$ 71.99
$ 10.00
Python Machine Learning - Second Edition Book Cover
Python Machine Learning - Second Edition
$ 31.99
$ 10.00
Mastering Assembly Programming Book Cover
Mastering Assembly Programming
$ 35.99
$ 10.00
Robot Operating System Cookbook Book Cover
Robot Operating System Cookbook
$ 39.99
$ 10.00