<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Golang on Miek Gieben</title>
    <link>https://miek.nl/tags/golang/</link>
    <description>Recent content in Golang on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Fri, 17 Jul 2020 05:39:00 +0000</lastBuildDate>
    <atom:link href="https://miek.nl/tags/golang/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Script to Upgrade to Latest Go version</title>
      <link>https://miek.nl/2020/july/17/script-to-upgrade-to-latest-go-version/</link>
      <pubDate>Fri, 17 Jul 2020 05:39:00 +0000</pubDate>
      <guid>https://miek.nl/2020/july/17/script-to-upgrade-to-latest-go-version/</guid>
      <description>&lt;p&gt;This is my super simple script to upgrade to a newer Go version. You might find it handy as well.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/zsh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GODIR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;~/up&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; latestGo &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local LATEST&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;curl -s &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;https://golang.org/dl/?mode=json&amp;#39;&lt;/span&gt; | jq -r &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;.[0].version&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local INSTALLED&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;go version | awk &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;{ print $3 }&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[[&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;INSTALLED&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        echo Go is up to date, running &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        exit &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    echo Upgrading Go from &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;INSTALLED&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; to &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local GOLANG&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;https://dl.google.com/go/&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;.linux-amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local TAR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;basename $GOLANG&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt; cd &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;GODIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      echo Downloading and extracting: $GOLANG &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      wget -q $GOLANG &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; rm -rf go &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; tar xvfz &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;TAR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;latestGo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Learning Go</title>
      <link>https://miek.nl/2019/august/13/learning-go/</link>
      <pubDate>Tue, 13 Aug 2019 07:39:00 +0000</pubDate>
      <guid>https://miek.nl/2019/august/13/learning-go/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://miek.nl/go&#34;&gt;Learning Go&lt;/a&gt; is a book that teaches you Go. It includes exercises (and solutions)&#xA;to help put your new knowledge to the test.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Switching to Vodafone Uncovered a Bug</title>
      <link>https://miek.nl/2017/november/17/switching-to-vodafone-uncovered-a-bug/</link>
      <pubDate>Fri, 17 Nov 2017 20:55:08 +0000</pubDate>
      <guid>https://miek.nl/2017/november/17/switching-to-vodafone-uncovered-a-bug/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve switched to Vodafone for all my cellular needs, in a twisted turn of events this&#xA;uncovered a goroutine leak in &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;miekg/dns&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;First some background on the setup I have at home (where this first showed up). I have your&#xA;run-of-the-mill LAN + Wifi and a Raspberry Pi running &lt;a href=&#34;https://coredns.io&#34;&gt;CoreDNS&lt;/a&gt; for my DNS&#xA;(proxy) needs. This &lt;a href=&#34;https://coredns.io&#34;&gt;CoreDNS&lt;/a&gt; instance forwards all DNS traffic to&#xA;&lt;a href=&#34;https://dns.google.com&#34;&gt;https://dns.google.com&lt;/a&gt; which uses a non-standard DNS protocol implemented as JSON over HTTPS.&#xA;I use this so that my DNS traffic is encrypted. Note that CoreDNS makes heavy use of&#xA;&lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;miekg/dns&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go and Alpine Linux</title>
      <link>https://miek.nl/2015/june/06/go-and-alpine-linux/</link>
      <pubDate>Sat, 06 Jun 2015 11:13:00 +0000</pubDate>
      <guid>https://miek.nl/2015/june/06/go-and-alpine-linux/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.alpinelinux.org/&#34;&gt;Alpine Linux&lt;/a&gt; is &lt;em&gt;the&lt;/em&gt; small Linux OS everybody&#xA;is using for Docker images. It is super small and has a sh*tload of packages.&#xA;It&amp;rsquo;s libc is &lt;a href=&#34;http://www.musl-libc.org/&#34;&gt;musl libc&lt;/a&gt;, which is different than&#xA;glibc most other Linux distros are using. When deploying Go on such a image you&#xA;want a truly static binary.&lt;/p&gt;&#xA;&lt;p&gt;Building a static binary can be done with the following command (this is for&#xA;&lt;a href=&#34;https://github.com/miekg/skydns&#34;&gt;SkyDNS&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% go build -ldflags &amp;quot;-linkmode external -extldflags -static&amp;quot;&#xA;# github.com/miekg/skydns&#xA;/var/tmp/go-link-FI6Ox0/000000.o: In function `_cgo_632c88804cec_C2func_getaddrinfo&#39;:&#xA;/home/miek/upstream/go/src/net/cgo_unix.go:55: warning: Using &#39;getaddrinfo&#39; in&#xA;statically linked applications requires at runtime the shared libraries from the&#xA;glibc version used for linking&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;That ugly warning is because glibc uses nss(5) &amp;ldquo;Nameserver Service Switch&amp;rdquo; which&#xA;uses dlopen(3) to &lt;em&gt;dynamically&lt;/em&gt; load the correct resolver library. The end&#xA;result is that the Go binary &lt;em&gt;can&amp;rsquo;t resolve any DNS records&lt;/em&gt;!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go in Markdown</title>
      <link>https://miek.nl/2015/may/09/learning-go-in-markdown/</link>
      <pubDate>Sat, 09 May 2015 07:39:00 +0000</pubDate>
      <guid>https://miek.nl/2015/may/09/learning-go-in-markdown/</guid>
      <description>&lt;p&gt;The original &lt;a href=&#34;http://miek.nl/downloads/Go/Learning-Go-latest.pdf&#34;&gt;Learning Go&lt;/a&gt;&#xA;is written in &lt;a href=&#34;https://github.com/miekg/gobook&#34;&gt;LaTeX&lt;/a&gt;. With LaTeX you get&#xA;beautiful (PDF) output, but there are a few problems. Most notably I consider&#xA;LaTeX an &lt;em&gt;output&lt;/em&gt; format: it is hard to convert it into something else. Markdown&#xA;offers much more flexibility in that regard. The downside of markdown is that is&#xA;not powerful enough to typeset a book. To fix this I forked&#xA;&lt;a href=&#34;https://github.com/russross/blackfriday&#34;&gt;BlackFriday&lt;/a&gt; extended it and renamed&#xA;it &lt;a href=&#34;https://github.com/miekg/mmark&#34;&gt;Mmark&lt;/a&gt; (These are all written in Golang).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS package</title>
      <link>https://miek.nl/2014/august/16/go-dns-package/</link>
      <pubDate>Sat, 16 Aug 2014 09:33:00 +0000</pubDate>
      <guid>https://miek.nl/2014/august/16/go-dns-package/</guid>
      <description>&lt;p&gt;Go DNS is a package that implements a DNS interface in &lt;a href=&#34;http://golang.org&#34;&gt;Go&lt;/a&gt;.&#xA;This library &lt;strike&gt;takes a new, innovative and enterprise ready&#xA;approach&lt;/strike&gt; sends and receives queries to and from the DNS.&#xA;It is licensed under the same license as the official Go code, as&#xA;this is a fork of that code.&lt;/p&gt;&#xA;&lt;p&gt;The aim is to be powerful, simple and fast.&lt;/p&gt;&#xA;&lt;p&gt;Supported:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All RR types;&lt;/li&gt;&#xA;&lt;li&gt;Synchronous and asynchronous queries and replies;&lt;/li&gt;&#xA;&lt;li&gt;DNSSEC: validation, signing, key generation, reading &lt;code&gt;.private&lt;/code&gt; key files&lt;/li&gt;&#xA;&lt;li&gt;(Fast) sending/receiving/printing packets, RRs;&lt;/li&gt;&#xA;&lt;li&gt;Full control over what is being send;&lt;/li&gt;&#xA;&lt;li&gt;Zone transfers, EDNS0, TSIG, NSID;&lt;/li&gt;&#xA;&lt;li&gt;Server side programming (a full blown nameserver).&lt;/li&gt;&#xA;&lt;li&gt;(Fast) reading zones/RRs from files/strings.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;code&#34;&gt;Code&lt;/h1&gt;&#xA;&lt;p&gt;The git repository is hosted on &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;github&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SkyDNS running live</title>
      <link>https://miek.nl/2014/june/28/skydns-running-live/</link>
      <pubDate>Sat, 28 Jun 2014 09:02:00 +0000</pubDate>
      <guid>https://miek.nl/2014/june/28/skydns-running-live/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/skynetservices/skydns&#34;&gt;SkyDNS&lt;/a&gt; is able to do DNSSEC. It generates&#xA;signatures and NSEC3 records on the fly. For authenticated denial of existence SkyDNS&#xA;uses &lt;a href=&#34;http://tools.ietf.org/html/rfc7129#appendix-B&#34;&gt;NSEC3 white lies&lt;/a&gt;, of course implementing&#xA;(and testing!) this isn&amp;rsquo;t completely trivial.&lt;/p&gt;&#xA;&lt;p&gt;To aid in debugging I&amp;rsquo;ve setup a live version of SkyDNS on &lt;code&gt;voordeur.atoom.net&lt;/code&gt;, under the name the&#xA;zone &lt;a href=&#34;http://dnssex.nl&#34;&gt;http://dnssex.nl&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% dig +mul +noall +answer @voordeur.atoom.net soa skydns.dnssex.nl&#xA;skydns.dnssex.nl.    3600 IN SOA ns1.dns.skydns.dnssex.nl. hostmaster.skydns.local. (&#xA;                            1403942400 ; serial&#xA;                            28800      ; refresh (8 hours)&#xA;                            7200       ; retry (2 hours)&#xA;                            604800     ; expire (1 week)&#xA;                            60         ; minimum (1 minute)&#xA;                            )&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To help getting DNSSEC support 100% working this zone has been delegated and has an DS record&#xA;in the parent zone. With &lt;code&gt;unbound-host&lt;/code&gt; you can see the validation status of this zone:&lt;/p&gt;</description>
    </item>
    <item>
      <title>SkyDNS version 2</title>
      <link>https://miek.nl/2014/june/08/skydns-version-2/</link>
      <pubDate>Sun, 08 Jun 2014 12:46:00 +0000</pubDate>
      <guid>https://miek.nl/2014/june/08/skydns-version-2/</guid>
      <description>&lt;p&gt;SkyDNS version 1 &lt;a href=&#34;http://blog.gopheracademy.com/skydns&#34;&gt;was announced some time ago&lt;/a&gt;, since then it&#xA;has seen some developments, which resulted in &lt;a href=&#34;https://github.com/skynetservices/skydns&#34;&gt;SkyDNS version 2&lt;/a&gt;. This new version uses &lt;a href=&#34;http://github.com/coreos/etcd&#34;&gt;Etcd&lt;/a&gt; as its backend. This blog post will walk you through the installation and shows how to use it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what&#34;&gt;What?!&lt;/h2&gt;&#xA;&lt;p&gt;SkyDNS(2) is a service discovery tool that utilizes the DNS to find hosts in a distributed environment. But&#xA;using DNS means &amp;ldquo;legacy&amp;rdquo; clients can be used. Want to know if you MariaDB cluster is still up?&#xA;&lt;code&gt;ping mariadb.skydns.local&lt;/code&gt; can be used for that. By default SkyDNS will use &lt;code&gt;skydns.local.&lt;/code&gt; as the domain&#xA;to anchor all names.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go</title>
      <link>https://miek.nl/2014/june/01/learning-go/</link>
      <pubDate>Sun, 01 Jun 2014 08:33:00 +0000</pubDate>
      <guid>https://miek.nl/2014/june/01/learning-go/</guid>
      <description>&lt;p&gt;&amp;ldquo;Learning Go&amp;rdquo; is a book that gives an introduction into the &lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt;&#xA;language of Google. It is licensed under a copy-left license.&#xA;The book currently consists out +/- 120 (A4 sized) pages and the following chapters:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;br/&gt;&#xA;Show how to install Go and details the lineage of the language Go.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Basics&lt;/em&gt;&lt;br/&gt;&#xA;Types, variables and control structures.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Functions&lt;/em&gt;&lt;br/&gt;&#xA;How to make and use functions.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Packages&lt;/em&gt;&lt;br/&gt;&#xA;Functions and data is grouped together in packages. Here you will see&#xA;how to make your own package. How to unit test your package is also&#xA;described.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Beyond the basics&lt;/em&gt;&lt;br/&gt;&#xA;Learn how to create your own data types and define function on them (called&#xA;methods in Go).&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Interfaces&lt;/em&gt;&lt;br/&gt;&#xA;Go does not support Object Orientation in the traditional sense.&#xA;In Go the central concept is interfaces.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Concurrency&lt;/em&gt;&lt;br/&gt;&#xA;With the &lt;code&gt;go&lt;/code&gt; keyword function can be started in separate routines (called&#xA;&lt;em&gt;goroutines&lt;/em&gt;). Communication with those goroutines is done via channels.&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;Communication&lt;/em&gt;&lt;br/&gt;&#xA;How to create/read/write from and to files. And how to do networking.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Each chapter concludes with a number of exercises (and answers) to may help you&#xA;to get some hands on experience. Currently it has more than 30 exercises.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS Router</title>
      <link>https://miek.nl/2014/may/17/dns-router/</link>
      <pubDate>Sat, 17 May 2014 10:35:00 +0000</pubDate>
      <guid>https://miek.nl/2014/may/17/dns-router/</guid>
      <description>&lt;p&gt;Say you have a zone that does not fit in the memory of one machine. Who hasn&amp;rsquo;t these&#xA;zones nowadays? How would you solve such a problem? With a DNS router of course!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/miekg/dnsrouter&#34;&gt;Dns router&lt;/a&gt; is a small Go program I whipped together that acts as a&#xA;DNS router. Clients register an &lt;code&gt;&amp;lt;ip:port, regexp&amp;gt;&lt;/code&gt; combination and will then only&#xA;receive queries that match that regular expression. The registration happens&#xA;in &lt;a href=&#34;https://github.com/coreos/etcd&#34;&gt;Etcd&lt;/a&gt;. Of course &amp;ldquo;Dns router&amp;rdquo; (I need a better name), has some&#xA;features, it will:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Personal Go install</title>
      <link>https://miek.nl/2013/december/02/personal-go-install/</link>
      <pubDate>Mon, 02 Dec 2013 20:28:00 +0000</pubDate>
      <guid>https://miek.nl/2013/december/02/personal-go-install/</guid>
      <description>&lt;p&gt;With &lt;a href=&#34;http://golang.org/doc/go1.2&#34;&gt;golang 1.2&lt;/a&gt;, both &lt;code&gt;godoc&lt;/code&gt; and&#xA;&lt;code&gt;go vet&lt;/code&gt; are removed from the main repository. Here is a super short&#xA;list of commands (that I personally use) to install Go and both tools.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;export GOBIN=~/bin&#xA;export GOPATH=~/g&#xA;mkdir -p ~/upstream&#xA;mkdir -p ~/g&#xA;cd ~/upstream&#xA;hg clone https://code.google.com/p/go/&#xA;hg update release&#xA;cd src&#xA;./all.bash&#xA;go get code.google.com/p/go.tools/cmd/godoc&#xA;go get code.google.com/p/go.tools/cmd/vet&#xA;go get code.google.com/p/go.tools/cmd/cover&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>PKCS11 wrapper for Go</title>
      <link>https://miek.nl/2013/august/17/pkcs11-wrapper-for-go/</link>
      <pubDate>Sat, 17 Aug 2013 03:32:00 +0000</pubDate>
      <guid>https://miek.nl/2013/august/17/pkcs11-wrapper-for-go/</guid>
      <description>&lt;p&gt;In my quest to write a DNS server in Go I found myself lacking an interface to PKCS#11, so I wrote&#xA;&lt;a href=&#34;http://github.com/miekg/pkcs11&#34;&gt;one&lt;/a&gt;. PKCS#11 is &lt;em&gt;the&lt;/em&gt; interface to HSMs (including SoftHSM), and&#xA;even though the interface sucks, I think a DNS server should store its keys in an HSM, by default.&lt;/p&gt;&#xA;&lt;p&gt;So&amp;hellip; here it is. I&amp;rsquo;m still putting in the finishing touches and some general polish, but it is&#xA;already usable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS API change WITH rewrite rules!</title>
      <link>https://miek.nl/2012/december/09/go-dns-api-change-with-rewrite-rules/</link>
      <pubDate>Sun, 09 Dec 2012 20:06:00 +0000</pubDate>
      <guid>https://miek.nl/2012/december/09/go-dns-api-change-with-rewrite-rules/</guid>
      <description>&lt;p&gt;In the standard library the DNS types have been renamed from RR_MX to MX which I&#xA;think is a good change. So I made the same change in Go DNS, but this time&#xA;I&amp;rsquo;m providing &lt;code&gt;gofmt -r&lt;/code&gt; rewrite rules. They all have the form:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;gofmt -r &#39;RR_A -&amp;gt; A&#39; -w *.go&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And then for &lt;em&gt;all&lt;/em&gt; the types, so it&amp;rsquo;s quite a list.&lt;/p&gt;&#xA;&lt;p&gt;Download the rewrite rules &lt;a href=&#34;https://miek.nl/downloads/2012/rewrite&#34;&gt;here&lt;/a&gt; and use&#xA;it like &lt;code&gt;$SHELL rewrite&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adding new RR types to GO DNS</title>
      <link>https://miek.nl/2012/november/30/adding-new-rr-types-to-go-dns/</link>
      <pubDate>Fri, 30 Nov 2012 20:01:00 +0000</pubDate>
      <guid>https://miek.nl/2012/november/30/adding-new-rr-types-to-go-dns/</guid>
      <description>&lt;p&gt;Inspired by&#xA;&lt;a href=&#34;https://www.nlnetlabs.nl/blog/2012/09/20/howto-add-new-rrtypes-to-nsd/&#34;&gt;NLnet Labs&lt;/a&gt; and&#xA;&lt;a href=&#34;http://bert-hubert.blogspot.nl/2012/11/adding-new-dns-record-types-to-powerdns.html&#34;&gt;PowerDNS&lt;/a&gt;,&#xA;I figured I couldn&amp;rsquo;t stay behind, so here is how to add new RRs to &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;Go DNS&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A small note before I delve into the details, I haven&amp;rsquo;t optimized Go DNS for adding new types, as this&#xA;is a relative infrequent event. There are a few items that need to be added before Go DNS&#xA;understands the new RR type.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Adding the type itself (as a structure) and the four methods needed to implement the&#xA;&lt;code&gt;RR&lt;/code&gt; interface;&lt;/li&gt;&#xA;&lt;li&gt;Adding the type number and the text string belonging it;&lt;/li&gt;&#xA;&lt;li&gt;Parsing from text, i.e. when parsing zonefiles.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Lets take the new DANE (&lt;a href=&#34;http://datatracker.ietf.org/doc/rfc6698/&#34;&gt;RFC6698&lt;/a&gt;) as an example.&#xA;The record is called TLSA, and looks like:&lt;/p&gt;</description>
    </item>
    <item>
      <title>User management in fksd</title>
      <link>https://miek.nl/2012/august/07/user-management-in-fksd/</link>
      <pubDate>Tue, 07 Aug 2012 21:58:00 +0000</pubDate>
      <guid>https://miek.nl/2012/august/07/user-management-in-fksd/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;If you do DNS for too long everything looks like 53.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In this &amp;ldquo;trace&amp;rdquo; I&amp;rsquo;m showing the logging of &lt;code&gt;fksd&lt;/code&gt; when I add a&#xA;zone, try to list it as a non-existent user &lt;code&gt;miekg&lt;/code&gt; (which fails), add the user&#xA;&lt;code&gt;miekg&lt;/code&gt; and list it again. User are identified by the key in the TSIG record, their&#xA;password is the shared secret.&lt;/p&gt;&#xA;&lt;p&gt;The &amp;ldquo;config files&amp;rdquo; from &lt;code&gt;nsupdate&lt;/code&gt; can be found in the &lt;a href=&#34;https://github.com/miekg/dns/tree/dev/ex/fksd/cmds&#34;&gt;github repo&#xA;of fksd&lt;/a&gt;.&#xA;The &lt;code&gt;nsupdate&lt;/code&gt; commands are preceded with a &lt;code&gt;%&lt;/code&gt;, extra comments are preceded with &lt;code&gt;#&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dynamic nameserver provisioning with dns pkts</title>
      <link>https://miek.nl/2012/august/06/dynamic-nameserver-provisioning-with-dns-pkts/</link>
      <pubDate>Mon, 06 Aug 2012 23:18:00 +0000</pubDate>
      <guid>https://miek.nl/2012/august/06/dynamic-nameserver-provisioning-with-dns-pkts/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m writing a nameserver called &lt;code&gt;fksd&lt;/code&gt; (Funkensturm daemon), which is&#xA;currently in a prototype stage (but the code is available at&#xA;&lt;a href=&#34;https://github.com/miekg/dns/tree/dev/ex/fksd&#34;&gt;github&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;In this server I&amp;rsquo;m pursuing some interesting directions in nameserver&#xA;development, such as the dynamic configuration as provided by&#xA;&lt;a href=&#34;http://www.isc.org/bind10/&#34;&gt;BIND10&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;BIND10 uses http(s), but I think using DNS packets is more in line&#xA;with a nameserver, so I opted for that route.&lt;/p&gt;&#xA;&lt;p&gt;With &lt;code&gt;fksd&lt;/code&gt; you can use packets (which will be TSIG signed in the&#xA;&lt;s&gt;future&lt;/s&gt; tomorrow) to configure the server. The only configuration possible at the&#xA;moment is adding a zone. Such a packet needs to have a TXT record like&#xA;the following in its AUTHORITY SECTION:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Libunbound wrapper in Go</title>
      <link>https://miek.nl/2012/july/01/libunbound-wrapper-in-go/</link>
      <pubDate>Sun, 01 Jul 2012 21:37:00 +0000</pubDate>
      <guid>https://miek.nl/2012/july/01/libunbound-wrapper-in-go/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve created a small wrapper for &lt;a href=&#34;https://unbound.net&#34;&gt;libunbound&lt;/a&gt; for use in&#xA;&lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The code can be &lt;a href=&#34;http://github.com/miekg/unbound&#34;&gt;found at github&lt;/a&gt;. It depends&#xA;on my Go DNS library which can be &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;found here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://unbound.nlnetlabs.nl/pipermail/unbound-users/2012-July/002431.html&#34;&gt;Official announcement on the Unbound-users@&#xA;list&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To give&#xA;you a little taste of how it looks, I&amp;rsquo;ve (re)created tutorials 2 to 6 in Go.&#xA;Tutorial 2 looks like this, for instance:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;package main&#xA;&#xA;// https://www.unbound.net/documentation/libunbound-tutorial-2.html&#xA;&#xA;import (&#xA;        &amp;quot;dns&amp;quot;&#xA;        &amp;quot;fmt&amp;quot;&#xA;        &amp;quot;os&amp;quot;&#xA;        &amp;quot;unbound&amp;quot;&#xA;)&#xA;&#xA;func main() {&#xA;        u := unbound.New()&#xA;        defer u.Destroy()&#xA;&#xA;        if err := u.ResolvConf(&amp;quot;/etc/resolv.conf&amp;quot;); err != nil {&#xA;                fmt.Printf(&amp;quot;error %s\n&amp;quot;, err.Error())&#xA;                os.Exit(1)&#xA;        }&#xA;&#xA;        if err := u.Hosts(&amp;quot;/etc/hosts&amp;quot;); err != nil {&#xA;                fmt.Printf(&amp;quot;error %s\n&amp;quot;, err.Error())&#xA;                os.Exit(1)&#xA;        }&#xA;&#xA;        r, err := u.Resolve(&amp;quot;www.nlnetlabs.nl.&amp;quot;, dns.TypeA, dns.ClassINET)&#xA;        if err != nil {&#xA;                fmt.Printf(&amp;quot;error %s\n&amp;quot;, err.Error())&#xA;                os.Exit(1)&#xA;        }&#xA;        fmt.Printf(&amp;quot;%+v\n&amp;quot;, r)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Printing MX records with Go DNS</title>
      <link>https://miek.nl/2012/june/21/printing-mx-records-with-go-dns/</link>
      <pubDate>Thu, 21 Jun 2012 10:30:00 +0000</pubDate>
      <guid>https://miek.nl/2012/june/21/printing-mx-records-with-go-dns/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;Now that the API seems to stabilize it is time to update these items.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We want to create a little program that prints out the MX records of domains, like so:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% mx miek.nl&#xA;miek.nl.        86400   IN      MX      10 elektron.atoom.net.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% mx microsoft.com &#xA;microsoft.com.  3600    IN      MX      10 mail.messaging.microsoft.com.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We are using my &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;Go DNS package&lt;/a&gt;.&#xA;First the normal header of a Go program, with a bunch of imports. We&#xA;need the &lt;code&gt;dns&lt;/code&gt; package:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Super-short guide to getting q (Part II)</title>
      <link>https://miek.nl/2012/march/04/super-short-guide-to-getting-q-part-ii/</link>
      <pubDate>Sun, 04 Mar 2012 10:54:00 +0000</pubDate>
      <guid>https://miek.nl/2012/march/04/super-short-guide-to-getting-q-part-ii/</guid>
      <description>&lt;p&gt;The development of the language &lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt; is&#xA;going at a fast pace, hence an updated version of&#xA;&lt;a href=&#34;https://miek.nl/2012/january/23/super-short_guide_to_getting_q/index.html&#34;&gt;Super-short guide to gettinq q&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Get the latest version (called &lt;code&gt;weekly&lt;/code&gt;) of Go:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Get Go: &lt;code&gt;hg clone -u release https://go.googlecode.com/hg/ go&lt;/code&gt;&#xA;Note the directory you have downloaded it to and set add its &lt;code&gt;bin&lt;/code&gt;&#xA;directory to your PATH: &lt;code&gt;PATH=$PWD/go/bin&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Update Go to the latest weekly: &lt;code&gt;cd go; hg pull; hg update weekly&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Compile Go: &lt;code&gt;cd src&lt;/code&gt;, you should now sit in &lt;code&gt;go/src&lt;/code&gt;.&#xA;And compile: &lt;code&gt;./all.bash&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>godns is now dns</title>
      <link>https://miek.nl/2012/february/11/godns-is-now-dns/</link>
      <pubDate>Sat, 11 Feb 2012 23:09:00 +0000</pubDate>
      <guid>https://miek.nl/2012/february/11/godns-is-now-dns/</guid>
      <description>&lt;p&gt;Due to the new &lt;code&gt;go&lt;/code&gt; tool (long story), I&amp;rsquo;ve renamed &lt;code&gt;godns&lt;/code&gt; to &lt;code&gt;dns&lt;/code&gt;.&#xA;This means the &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;github repo is also somewhere else&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;godns&lt;/code&gt; installed itself as &lt;code&gt;dns&lt;/code&gt; so code using it does &lt;em&gt;not&lt;/em&gt; need to be changed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS Fingerprinting</title>
      <link>https://miek.nl/2012/january/28/dns-fingerprinting/</link>
      <pubDate>Sat, 28 Jan 2012 16:03:00 +0000</pubDate>
      <guid>https://miek.nl/2012/january/28/dns-fingerprinting/</guid>
      <description>&lt;h1 id=&#34;announcing-fp&#34;&gt;Announcing FP&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;The&lt;/em&gt; tool for DNS fingerprinting is &lt;a href=&#34;https://github.com/kirei/fpdns&#34;&gt;fpdns&lt;/a&gt;, which is Perl based.&#xA;In recent times development seems to have picked up, but a little competition never hurt&#xA;anyone, so I wrote &lt;code&gt;fp&lt;/code&gt; in Go. Fp is also a fingerprint program for DNS servers. Its aim is to&#xA;be more readable then &lt;code&gt;fpdns&lt;/code&gt; is (was?). And make it more easy to add new server types.&lt;/p&gt;&#xA;&lt;p&gt;Help needed!&lt;/p&gt;&#xA;&lt;p&gt;Do you have some old(er) nameserver laying around that can be queried? Does your (sick) mind&#xA;know of a few extra evil queries that can be sent to nameservers? If so, please contact&#xA;me: &lt;code&gt;query@evilquery.nl&lt;/code&gt;. I want to get to a point where &lt;code&gt;fp&lt;/code&gt; sends about 10 queries that&#xA;can be used to identify a server.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Super-short guide to getting q</title>
      <link>https://miek.nl/2012/january/23/super-short-guide-to-getting-q/</link>
      <pubDate>Mon, 23 Jan 2012 18:07:00 +0000</pubDate>
      <guid>https://miek.nl/2012/january/23/super-short-guide-to-getting-q/</guid>
      <description>&lt;p&gt;Get the latest version (called &lt;code&gt;weekly&lt;/code&gt;) of Go:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Get Go: &lt;code&gt;hg clone -u release https://go.googlecode.com/hg/ go&lt;/code&gt;&#xA;Note the directory you have downloaded it to and set&#xA;$GOROOT to it: &lt;code&gt;export GOROOT=$PWD/go&lt;/code&gt;.&#xA;Add the GOROOT bin directory to your path: &lt;code&gt;PATH=$PATH:$GOROOT/bin&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Update Go to the latest weekly: &lt;code&gt;cd $GOROOT; hg pull; hg update weekly&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Compile Go: &lt;code&gt;cd $GOROOT/src ; ./all.bash&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Install missing commands (gcc, sed, bison, etc.) if needed.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The latest Go is now installed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go for E-readers</title>
      <link>https://miek.nl/2011/august/28/learning-go-for-e-readers/</link>
      <pubDate>Sun, 28 Aug 2011 20:45:00 +0000</pubDate>
      <guid>https://miek.nl/2011/august/28/learning-go-for-e-readers/</guid>
      <description>&lt;p&gt;Thanks to a patch from Thomas Kappler I can now offer two types of PDFs,&#xA;one for A4 pages and one for E-readers, like the kindle.&lt;/p&gt;&#xA;&lt;p&gt;The E-reader variant is suffixed with &lt;code&gt;-kindle&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/files/go/20110828-go-kindle.pdf&#34;&gt;Learning Go for E-readers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;files/go/20110828-go.pdf&#34;&gt;Learning Go A4 paper&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>VIM setup</title>
      <link>https://miek.nl/2011/august/12/vim-setup/</link>
      <pubDate>Fri, 12 Aug 2011 09:04:00 +0000</pubDate>
      <guid>https://miek.nl/2011/august/12/vim-setup/</guid>
      <description>&lt;p&gt;After several years I decided to use a different color scheme for VIM.&#xA;Also I&amp;rsquo;m going for force myself to use VIM&amp;rsquo;s folding abilities and use&#xA;&lt;code&gt;make&lt;/code&gt; from within VIM.&lt;/p&gt;&#xA;&lt;p&gt;For good measure I also want to use Omni-completion when writing Go&#xA;code:&lt;/p&gt;&#xA;&lt;img width=&#34;600&#34; src=&#34;https://miek.nl/images/2011/omni.jpg&#34; alt=&#34;omni completion screenshot&#34;/&gt; &#xA;&lt;p&gt;Btw, this screenshots also shows the &lt;code&gt;solarized&lt;/code&gt; (dark) colorscheme.&lt;/p&gt;&#xA;&lt;h1 id=&#34;coloring&#34;&gt;Coloring&lt;/h1&gt;&#xA;&lt;p&gt;Google for &lt;code&gt;solarized&lt;/code&gt;. In my &lt;code&gt;.vimrc&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;let g:solarized_termcolors=256&#xA;colorscheme solarized&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;make-from-vim&#34;&gt;Make from VIM&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;:make&lt;/code&gt; inside the editor and jump through the errors with:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Chaining proxies</title>
      <link>https://miek.nl/2011/august/01/chaining-proxies/</link>
      <pubDate>Mon, 01 Aug 2011 20:38:00 +0000</pubDate>
      <guid>https://miek.nl/2011/august/01/chaining-proxies/</guid>
      <description>&lt;p&gt;Online signing is cool, but slow. Caching queries in a reverse proxy is&#xA;nice, but useless for something like NSD. But what&#xA;if you want to do online signing in a fast way?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Enter: proxy chaining.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I already showed &lt;a href=&#34;https://miek.nl/2011/january/24/funkensign/index.html&#34;&gt;FunkenSign&lt;/a&gt; (example code&#xA;is quite old though)&#xA;and yesterday &lt;a href=&#34;https://miek.nl/2011/july/31/reverse_dns_proxy/index.html&#34;&gt;FunkenShield&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What if you combine the two? That gives the best of both worlds:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Online signing;&lt;/li&gt;&#xA;&lt;li&gt;Caching;&lt;/li&gt;&#xA;&lt;li&gt;And it adheres to the true Unix philosophy: do one thing,  and do one thing well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So lets get some figures again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reverse DNS proxy</title>
      <link>https://miek.nl/2011/july/31/reverse-dns-proxy/</link>
      <pubDate>Sun, 31 Jul 2011 16:09:00 +0000</pubDate>
      <guid>https://miek.nl/2011/july/31/reverse-dns-proxy/</guid>
      <description>&lt;p&gt;Have a slow nameserver and want to spice things up? How about a reverse DNS&#xA;proxy? For lack of a cool name I chose the name &lt;em&gt;FunkenShield&lt;/em&gt;. It&amp;rsquo;s (of course)&#xA;in the early stages, but it works quite nicely already.&lt;/p&gt;&#xA;&lt;p&gt;This is done with the framework of&#xA;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm_a_versatile_dns_proxy/index.html&#34;&gt;FunkenSturm&lt;/a&gt;.&#xA;Which is part of &lt;a href=&#34;http://github.com/miekg/godns&#34;&gt;GoDNS&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how-it-works&#34;&gt;How it works:&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You place FunkenShield in front of your nameserver and it will cache the binary packets&#xA;coming from your server in a local cache.&lt;/p&gt;</description>
    </item>
    <item>
      <title>On programming languages and programmers</title>
      <link>https://miek.nl/2011/july/18/on-programming-languages-and-programmers/</link>
      <pubDate>Mon, 18 Jul 2011 13:02:00 +0000</pubDate>
      <guid>https://miek.nl/2011/july/18/on-programming-languages-and-programmers/</guid>
      <description>&lt;p&gt;Very well written email message from Geoff Teale&#xA;on the &lt;a href=&#34;http://groups.google.com/group/golang-nuts/&#34;&gt;golang mailing list&lt;/a&gt; on programmers and&#xA;progamming languages&#xA;(&lt;a href=&#34;http://groups.google.com/group/golang-nuts/browse_thread/thread/350bf027bd803af1&#34;&gt;thread&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;To summarise a long presentation I gave to non-programmers:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There are 12 million programmers in the world&lt;/li&gt;&#xA;&lt;li&gt;The majority of those programmers are scarcely qualified&lt;/li&gt;&#xA;&lt;li&gt;Most technology decisions are made by a combination of following the crowd&#xA;and a false understanding of risk.&lt;/li&gt;&#xA;&lt;li&gt;The high cost and failure rate in software development is no coincidence.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Remember the Stevie Wonder rule - &amp;ldquo;When you believe in something you don&amp;rsquo;t&#xA;understand then you suffer&amp;rdquo;.   In this case that means &amp;ldquo;Perhaps making&#xA;programming language decisions based on what 12 million powerless idiots are&#xA;doing isn&amp;rsquo;t the golden road to glory and great hacks.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS (update)</title>
      <link>https://miek.nl/2011/july/06/go-dns-update/</link>
      <pubDate>Wed, 06 Jul 2011 08:41:00 +0000</pubDate>
      <guid>https://miek.nl/2011/july/06/go-dns-update/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m finally back to coding Go DNS and making it work with&#xA;the latest Go releases. Also the API has changed quite significantly&#xA;since the last time I blogged about it.&lt;/p&gt;&#xA;&lt;p&gt;So this I will detail&#xA;&lt;a href=&#34;https://github.com/miekg/godns/blob/master/_examples/key2ds/key2ds.go&#34;&gt;key2ds&lt;/a&gt; which is small utility that queries&#xA;a zone and print any DNSKEY records as DS records on the fly, to show the new API and&#xA;some sample usage.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% ./key2ds sidn.nl&#xA;sidn.nl.    0   IN  DS  42033 8 1 343F74674D36C9B5BE2CEB2C401AC4EDEB2A05B2&#xA;sidn.nl.    0   IN  DS  42033 8 2 BF985EC0738FACC89EE0B12FBD9261827C59191D9EA6A9BDFF55F9BDF3DBBFF3&#xA;sidn.nl.    0   IN  DS  39274 8 1 E79E031DFDE8E68EF1E2C6CA0943C2CC0DED1889&#xA;sidn.nl.    0   IN  DS  39274 8 2 8E8A8CFB40FD0C30BFA82E53752E1C257DAFB7B6206D12B9EDA43AF3EAB2157D&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This util uses synchronous queries. I will explain the &lt;code&gt;main&lt;/code&gt;-function:&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS reflector server in GO</title>
      <link>https://miek.nl/2011/april/04/dns-reflector-server-in-go/</link>
      <pubDate>Mon, 04 Apr 2011 21:08:00 +0000</pubDate>
      <guid>https://miek.nl/2011/april/04/dns-reflector-server-in-go/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m (again) rewriting the API of &lt;a href=&#34;https://github.com/miekg/godns&#34;&gt;godns&lt;/a&gt;. I&amp;rsquo;ve now&#xA;taking a cue from the &lt;a href=&#34;http://golang.org/pkg/http/&#34;&gt;http package in Go&lt;/a&gt;, the result&#xA;seems very nice. A reflector (returns your query in the answer) in Go becomes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;package main&#xA;&#xA;import (&#xA;        &amp;quot;dns&amp;quot;&#xA;        &amp;quot;log&amp;quot;&#xA;)&#xA;&#xA;func ReflectServer(w dns.ResponseWriter, req *dns.Msg) {&#xA;        m := new(dns.Msg)&#xA;        m.SetReply(req)&#xA;&#xA;        m.Extra = make([]dns.RR, 1)&#xA;        m.Extra[0] = &amp;amp;dns.RR_TXT{Hdr: dns.RR_Header{Name: m.Question[0].Name, Rrtype: dns.TypeTXT, &#xA;                Class: dns.ClassINET, Ttl: 0}, Txt: &amp;quot;Hello world&amp;quot;}&#xA;        buf, _ := m.Pack()&#xA;        w.Write(buf)&#xA;}&#xA;&#xA;func main() {&#xA;        dns.HandleFunc(&amp;quot;.&amp;quot;, ReflectServer)&#xA;        err := dns.ListenAndServe(&amp;quot;:8053&amp;quot;, &amp;quot;udp&amp;quot;, nil)&#xA;        if err != nil {&#xA;                log.Fatal(&amp;quot;ListenAndServe: &amp;quot;, err.String())&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Learning Go - version 0.3</title>
      <link>https://miek.nl/2011/february/28/learning-go-version-0.3/</link>
      <pubDate>Mon, 28 Feb 2011 20:54:00 +0000</pubDate>
      <guid>https://miek.nl/2011/february/28/learning-go-version-0.3/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve tagged a new version of &amp;ldquo;Learning Go&amp;rdquo;, version 0.3.&#xA;It&amp;rsquo;s more of a snapshot of the current development, than&#xA;an actual &amp;ldquo;release&amp;rdquo; release.&lt;/p&gt;&#xA;&lt;p&gt;There are lots of fixes, code updates and tweaks. Numerous&#xA;people send in fixes. Thank you all for the contributions!&lt;/p&gt;&#xA;&lt;p&gt;Get it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2011/go-0.3.pdf&#34;&gt;PDF&lt;/a&gt; download;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2011/go.pdf&#34;&gt;Latest daily build&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Feedback is welcome.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;To see the development version you can use:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary&#34;&gt;Gitweb repository&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/files/go/&#34;&gt;Daily builds&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Major stuff coming in 0.4:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensign</title>
      <link>https://miek.nl/2011/january/24/funkensign/</link>
      <pubDate>Mon, 24 Jan 2011 12:52:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/24/funkensign/</guid>
      <description>&lt;p&gt;How about on-the-fly signing? In this example we add a signature&#xA;to any packet dealing with &lt;code&gt;www.example.org.&lt;/code&gt; Again it is a&#xA;matter of defining the matching, action and setup functions.&lt;/p&gt;&#xA;&lt;h1 id=&#34;matching&#34;&gt;Matching&lt;/h1&gt;&#xA;&lt;p&gt;We don&amp;rsquo;t have to match anything coming in, we only need to sign&#xA;pkts on their way out. So the function becomes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;func match(m *dns.Msg, d int) (*dns.Msg, bool) {&#xA;        // Matching criteria&#xA;        switch d { &#xA;        case IN: &#xA;                // nothing&#xA;        case OUT:&#xA;                // nothing&#xA;        }   &#xA;        // Packet Mangling&#xA;        switch d { &#xA;        case IN: &#xA;                // nothing&#xA;        case OUT:&#xA;                if m.Question[0].Name == &amp;quot;www.example.org.&amp;quot; {&#xA;                        // On the way out sign the packet&#xA;                        m = sign(m) // keys are global&#xA;                }   &#xA;        }   &#xA;        return m, true&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;As you can see, it calls the &lt;code&gt;sign()&lt;/code&gt; function where the actual signing&#xA;takes place. We just sign the first RR in the answer section —&#xA;if there is one.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensturm</title>
      <link>https://miek.nl/2011/january/23/funkensturm/</link>
      <pubDate>Sun, 23 Jan 2011 20:59:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm/</guid>
      <description>&lt;p&gt;You need to install &lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt; and &lt;a href=&#34;https://github.com/miekg/godns&#34;&gt;Go DNS&lt;/a&gt;,&#xA;but then you can play with &lt;em&gt;Funkensturm&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/index.html&#34;&gt;Architecture and announcement&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/index.html&#34;&gt;Transparant proxy example&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-delaying-proxy-example/index.html&#34;&gt;Delaying proxy example&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/24/funkensign/index.html&#34;&gt;Signing proxy example&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Funkensturm: delaying proxy example</title>
      <link>https://miek.nl/2011/january/23/funkensturm-delaying-proxy-example/</link>
      <pubDate>Sun, 23 Jan 2011 20:50:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm-delaying-proxy-example/</guid>
      <description>&lt;p&gt;Another application for Funkensturm is: delaying packets.&#xA;Here we only delay packets with the recursion desired bit (RD)&#xA;set, but it can be easily be changed to check for other&#xA;properties of a packet, see &lt;code&gt;godoc dns&lt;/code&gt; for all elements of&#xA;DNS packets.&lt;/p&gt;&#xA;&lt;p&gt;The configuration is similar as described&#xA;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/index.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;matching-pkts-with-rd-bit-set&#34;&gt;Matching pkts with RD bit set&lt;/h1&gt;&#xA;&lt;p&gt;The matching function becomes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// the only matching we do is on the RD bit&#xA;// for incoming packets.&#xA;func match(m *dns.Msg, d int) (*dns.Msg, bool) {&#xA;        // Matching criteria&#xA;        var ok bool&#xA;        switch d {&#xA;        case IN:&#xA;                // only delay pkts with RD bit &#xA;                ok = m.MsgHdr.RecursionDesired == true&#xA;        case OUT:&#xA;                // nothing&#xA;        }&#xA;&#xA;        // Packet Mangling&#xA;        switch d {&#xA;        case IN:&#xA;                // nothing&#xA;        case OUT:&#xA;                // nothing&#xA;        }&#xA;        return m, ok&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;action-function&#34;&gt;Action function&lt;/h1&gt;&#xA;&lt;p&gt;First a delay helper function. As shown here it returns &lt;code&gt;true&lt;/code&gt; if&#xA;the delay time isn&amp;rsquo;t reached, and &lt;code&gt;false&lt;/code&gt; if a something should be&#xA;delayed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensturm: transparent proxy example</title>
      <link>https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/</link>
      <pubDate>Sun, 23 Jan 2011 19:00:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/</guid>
      <description>&lt;p&gt;A transparent proxy is a proxy that does nothing, but it&#xA;serves as a nice introduction into Funkensturm.&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/index.html&#34;&gt;this&#xA;post&lt;/a&gt;&#xA;for an architectural overview of Funkensturm.&lt;/p&gt;&#xA;&lt;p&gt;Currently a configuration is compiled into the Funkensturm binary. As such&#xA;it must look like a normal Go program.&lt;/p&gt;&#xA;&lt;h1 id=&#34;matching-function&#34;&gt;Matching function&lt;/h1&gt;&#xA;&lt;p&gt;The matching function checks a packet for features and can&#xA;optionally modify it.&lt;/p&gt;&#xA;&lt;p&gt;This is the prototype of a matching function:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;func match(m *dns.Msg, d int) (*dns.Msg, bool)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It receives a &lt;code&gt;*dns.Msg&lt;/code&gt; which is a packet in Go DNS and a direction &lt;code&gt;d&lt;/code&gt;&#xA;which can be &lt;code&gt;IN&lt;/code&gt; (first incoming packet) or &lt;code&gt;OUT&lt;/code&gt; when the packet is&#xA;on its way back to the client. It returns a DNS packet and a boolean&#xA;value signaling a match.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensturm: a versatile DNS proxy</title>
      <link>https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/</link>
      <pubDate>Sun, 23 Jan 2011 16:52:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/</guid>
      <description>&lt;h1 id=&#34;whats-a-dns-proxy&#34;&gt;What&amp;rsquo;s a DNS proxy?&lt;/h1&gt;&#xA;&lt;p&gt;A proxy is something this sits between a client and a server and does something&#xA;with the data flowing through it. So a DNS proxy does this for DNS packets.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how-does-funkensturm-work&#34;&gt;How does Funkensturm work?&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;Funkensturm&lt;/em&gt; consists out of 3 configuration parts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A setup function for the initial setup.&lt;/li&gt;&#xA;&lt;li&gt;Match/Modify function(s) — This function checks the packet for configured&#xA;properties. If there is match &lt;code&gt;true&lt;/code&gt; is returned.&lt;/li&gt;&#xA;&lt;li&gt;Action function(s) — Taking the truth value from 2. (and the packet) as input, it&#xA;does something with it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;With this setup you can change incoming packets before they are send through to the&#xA;server. And you can change packet coming from the server that are send back to the&#xA;client.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNSSEC validation in Go for fun and profit</title>
      <link>https://miek.nl/2011/january/02/dnssec-validation-in-go-for-fun-and-profit/</link>
      <pubDate>Sun, 02 Jan 2011 18:46:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/02/dnssec-validation-in-go-for-fun-and-profit/</guid>
      <description>&lt;p&gt;Doing cryptography is hard, luckily there are enough libraries&#xA;out there that help you with it. &lt;a href=&#34;http://www.openssl.org&#34;&gt;OpenSSL&lt;/a&gt; is&#xA;probably one of the best (known).&#xA;Go has its own &lt;a href=&#34;http://golang.org/pkg/crypto/&#34;&gt;crypto library&lt;/a&gt;, which is&#xA;written in pure Go.&lt;/p&gt;&#xA;&lt;p&gt;Now with these aids crypto becomes doable for mere mortals, but&#xA;all these libraries work with buffers which hold the data, the&#xA;signature and sometimes the key also. Off-by-one errors in composing&#xA;these buffers leads to a &amp;ldquo;Bogus signature&amp;rdquo; error (in DNSSEC). The problem&#xA;here is that you don&amp;rsquo;t get any other clue on what went wrong. For me as&#xA;a programmer an error such as &amp;ldquo;Shift buffer A one byte to the&#xA;left and you&amp;rsquo;re OK&amp;rdquo;, would be much better. But due to the nature of crypto&#xA;these kind of errors are not possible, nor desirable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS and AXFR</title>
      <link>https://miek.nl/2011/january/01/go-dns-and-axfr/</link>
      <pubDate>Sat, 01 Jan 2011 19:15:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/01/go-dns-and-axfr/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve implemented &lt;code&gt;axfr&lt;/code&gt; in my &lt;a href=&#34;https://github.com/miekg/godns&#34;&gt;Go DNS&#xA;library&lt;/a&gt; in nice and Go-like way (at&#xA;least that&amp;rsquo;s what I like to think).&#xA;Starting an &lt;code&gt;axfr&lt;/code&gt; results in a channel which can then be used with&#xA;the &lt;code&gt;range&lt;/code&gt; keyword to loop over it, until the entire &lt;code&gt;axfr&lt;/code&gt; is&#xA;received.&lt;/p&gt;&#xA;&lt;h1 id=&#34;using-it&#34;&gt;Using it&lt;/h1&gt;&#xA;&lt;p&gt;First the normal begin of a Go program:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;package main&#xA;import (&#xA;    &amp;quot;fmt&amp;quot;&#xA;    &amp;quot;dns&amp;quot;           // DNS package&#xA;)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Then we start the main function in which we define a new resolver and&#xA;a channel for receiving the &lt;code&gt;axfr&lt;/code&gt; messages. The channels will&#xA;send &lt;code&gt;dns.xfr&lt;/code&gt; messages which is defined as:&lt;/p&gt;</description>
    </item>
    <item>
      <title>(Re)announcing GoDNS</title>
      <link>https://miek.nl/2010/december/19/reannouncing-godns/</link>
      <pubDate>Sun, 19 Dec 2010 12:13:00 +0000</pubDate>
      <guid>https://miek.nl/2010/december/19/reannouncing-godns/</guid>
      <description>&lt;p&gt;[ post updated to reflect changes in the library ]&lt;/p&gt;&#xA;&lt;p&gt;This library &lt;strike&gt;takes a new, innovative and enterprise ready&#xA;approach&lt;/strike&gt; sends and receives queries to and from the DNS.&lt;/p&gt;&#xA;&lt;p&gt;The&#xA;library was forked from the official DNS code in Go (in the &lt;code&gt;net&lt;/code&gt;&#xA;package). Since that time Go team has thrown out this code and started&#xA;to use the system&amp;rsquo;s C library via a wrapper. I was however struck by the elegance of the&#xA;code (esp. the &lt;code&gt;pack&lt;/code&gt; and &lt;code&gt;unpack&lt;/code&gt; functions), so I forked it and added&#xA;new record types (&lt;code&gt;AAAA&lt;/code&gt;, &lt;code&gt;DS&lt;/code&gt;, &lt;code&gt;RRSIG&lt;/code&gt;, etc.) and turned into a more&#xA;general DNS API.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go - version 0.2</title>
      <link>https://miek.nl/2010/october/27/learning-go-version-0.2/</link>
      <pubDate>Wed, 27 Oct 2010 21:09:00 +0000</pubDate>
      <guid>https://miek.nl/2010/october/27/learning-go-version-0.2/</guid>
      <description>&lt;p&gt;This morning I&amp;rsquo;ve tagged version 0.2 of &amp;ldquo;Learning Go&amp;rdquo;.&#xA;Among the larger changes is that &amp;ldquo;Interfaces&amp;rdquo; is now a separate&#xA;chapter.&lt;/p&gt;&#xA;&lt;p&gt;I have also removed/added/updated the text. Fixed mistakes in the text&#xA;and code (and probably added new ones).&lt;/p&gt;&#xA;&lt;p&gt;To get it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2010/go-0.2.pdf&#34;&gt;PDF&lt;/a&gt; download&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary&#34;&gt;Gitweb repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/files/go/&#34;&gt;Daily builds&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2010/go.pdf&#34;&gt;Latest daily build&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Feedback is welcome.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;Of course a lot of work still needs to be done:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;(Finally) fix all the exercises;&lt;/li&gt;&#xA;&lt;li&gt;Test/Retest if all the Go code works with the latest compiler;&lt;/li&gt;&#xA;&lt;li&gt;Finish the last chapters (chapter 6,7 and 8);&lt;/li&gt;&#xA;&lt;li&gt;&amp;hellip;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Go book update</title>
      <link>https://miek.nl/2010/october/18/go-book-update/</link>
      <pubDate>Mon, 18 Oct 2010 09:10:00 +0000</pubDate>
      <guid>https://miek.nl/2010/october/18/go-book-update/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m preparing a 0.2 version of the &lt;a href=&#34;https://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary&#34;&gt;Go&#xA;book&lt;/a&gt; I&amp;rsquo;m&#xA;writing. There are lots of small tweaks in the text and in the layout. I&#xA;&lt;em&gt;still&lt;/em&gt; need to extend the number exercises (and enhance the answers a&#xA;bit), but it is slowly coming together.&lt;/p&gt;&#xA;&lt;p&gt;There is a new chapter on how to write programs that communicate with the&#xA;outside world (via files, sockets, etc.).&lt;/p&gt;&#xA;&lt;p&gt;Some &lt;em&gt;infrastructure&lt;/em&gt; work includes an automatic code checker —&#xA;sadly written in Perl.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go number cruncher</title>
      <link>https://miek.nl/2010/august/17/go-number-cruncher/</link>
      <pubDate>Tue, 17 Aug 2010 21:27:00 +0000</pubDate>
      <guid>https://miek.nl/2010/august/17/go-number-cruncher/</guid>
      <description>&lt;p&gt;Write a number cruncher that works as follows:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Pick six (6) random numbers from this list:&#xA;&lt;code&gt;&lt;pre&gt;&#xA;1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 25, 50, 75, 100&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Numbers may be picked multiple times.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Pick one (1) random number (i) in the range:&#xA;&lt;code&gt;&lt;pre&gt;&#xA;1 . . . 1000&#xA;&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Tell how, by combining the first 6 numbers or or subset with the operators +,-,* and /, you can&#xA;make i;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go - version 0.1</title>
      <link>https://miek.nl/2010/august/16/learning-go-version-0.1/</link>
      <pubDate>Mon, 16 Aug 2010 20:46:00 +0000</pubDate>
      <guid>https://miek.nl/2010/august/16/learning-go-version-0.1/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve tagged an 0.1 version of the book I&amp;rsquo;m writing: &amp;ldquo;Learning Go&amp;rdquo;. It&#xA;currently has 7 chapters. The first five are finished. Chapter 6 and 7&#xA;still need work. The exercises can also use some (more) love.&#xA;The current chapter list of &amp;ldquo;Learning Go&amp;rdquo; is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Introduction&lt;/li&gt;&#xA;&lt;li&gt;Basics&lt;/li&gt;&#xA;&lt;li&gt;Functions&lt;/li&gt;&#xA;&lt;li&gt;Packages&lt;/li&gt;&#xA;&lt;li&gt;Beyond the basics&lt;/li&gt;&#xA;&lt;li&gt;Concurrency&lt;/li&gt;&#xA;&lt;li&gt;Communication&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;To get it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2010/go-0.1.pdf&#34;&gt;PDF&lt;/a&gt; download&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary&#34;&gt;Gitweb repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you have comments, text or exercises feel free to drop an email.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
