This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://play.golang.org/p/l_GmjX31XbM | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
// Main has a Field2 whose type we don't know at the time of unmarshaling. We |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Q: What happens when you fill a channel, close it, then try to recv? | |
// A: You can keep reading the values until the buffer is empty, then | |
// the close operation takes effect | |
package main | |
import ( | |
"fmt" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"reflect" | |
"github.com/gotk3/gotk3/glib" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"github.com/Northern-Lights/going/file" | |
) | |
// LoadPrivate loads an (unencrypted) RSA private key from PEM data | |
func LoadPrivate(filepath string) (*rsa.PrivateKey, error) { |