Skip to content

Instantly share code, notes, and snippets.

@amelhusic
amelhusic / go-trace-workaround.md
Created May 14, 2020 09:34 — forked from gitforbit/go-trace-workaround.md
Go tool trace workaround
@amelhusic
amelhusic / stringToReaderCloser.go
Created November 19, 2020 13:24 — forked from crgimenes/stringToReaderCloser.go
string to io.ReadCloser
package main
import (
"bytes"
"fmt"
"io/ioutil"
)
func main() {
r := ioutil.NopCloser(bytes.NewReader([]byte("hello world"))) // r type is io.ReadCloser
@amelhusic
amelhusic / verify_certificate.go
Created November 20, 2020 11:11 — forked from devtdeng/verify_certificate.go
Verify a certificate with chain with golang crypto library
package main
import (
"crypto/x509"
"encoding/pem"
"io/ioutil"
"log"
"os"
)