Programming in Go

All Systems Go

© Lead Image © nomadsoul1, 123RF.com

© Lead Image © nomadsoul1, 123RF.com

Article from Issue 162/2014
Author(s):

The Go programming language combines type safety with manageable syntax and an extensive library. We take you through a programming example.

The Go programming language recently celebrated its fourth birthday and increasing popularity. The language has very few limits when it comes to coding Unix daemons, networking code, parallelized programs, and the like, although it is probably less well-suited for an operating system kernel. The Docker container virtualization project and Ubuntu Juju tool are two examples of projects written in Go.

Designed as an heir to the C programming language [1], Go offers many of its predecessor's strengths, while simplifying syntax and supporting secure programming (e.g., through strong type casting). The Unsafe module makes Go resemble C more closely, although it does compromise security, as the module name suggests.

The standard Go library [2] is extensive, offering many useful system programming modules for data compression, cryptography, binary file formats (ELF, Mach-O), and so forth. In this article, I will create a simple tool written in Go that has a function similar to the ps process status tool in Linux.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Command Line – Probing /proc

    The mysterious /proc virtual filesystem is a rich mine of information about everything in your system.

  • sysdig

    Many Linux diagnostic tools require knowledge of a special syntax, which complicates handling and confuses the output. Sysdig groups several important tools into a single interface.

  • Udev

    After three years of hanging around on the sidelines, Udev has finally ousted the legacy Dev-FS system. We take a look under the hood at the Udev device management system inside your Linux system.

  • How to Write a Rootkit

    Today’s rootkits infiltrate a target system at kernel level, thus escaping unwanted attention from administrators. Read on for a practical look at how a kernel rootkit really works.

  • Bootchart

    Bootchart analyzes the boot process and tells you where the system is wasting time.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News