Skip to content

Instantly share code, notes, and snippets.

@stuart-warren
stuart-warren / simple-gpg-enc.go
Last active Feb 4, 2021
golang gpg/openpgp encryption/decryption example
View simple-gpg-enc.go
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)
@steeve
steeve / _readme.md
Last active Jan 11, 2021
How to cross compile Go with CGO programs for a different OS/Arch
View _readme.md

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@spikebike
spikebike / client.go
Created Mar 29, 2012
TLS server and client
View client.go
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)