Skip to content

Instantly share code, notes, and snippets.

View mmcken3's full-sized avatar

Mitchell Mckenzie mmcken3

  • Credit Karma
  • Charlotte, NC
View GitHub Profile
@mmcken3
mmcken3 / transact.go
Last active June 3, 2020 14:28
How to create a transaction function wrapper for use with sqlx in Go to work with your DB in transaction blocks.
package main
import (
"fmt"
"log"
"github.com/jmoiron/sqlx"
"github.com/pkg/errors"
// postgres driver
@mmcken3
mmcken3 / twilio.go
Last active December 6, 2018 01:34
How to send a text message with Twilio using Go
package twilio
import (
"encoding/json"
"fmt"
"math/rand"
"net/http"
"net/url"
"strings"
"time"