Skip to content

Instantly share code, notes, and snippets.

aodin

Block or report user

Report or block aodin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aodin
aodin / gist:9493190
Last active Oct 12, 2019
Parsing JSON in a request body with Go
View gist:9493190
package main
import (
"encoding/json"
"io/ioutil"
"log"
"net/http"
)
type Message struct {
View IsRemote Benchmark
package repo
import (
"testing"
)
func BenchmarkIsRemote(b *testing.B) {
repos := []Repo{
{Path: "git://github.com/foo/far"},
{Path: "git://github.com/foo/far.git"},
View IsRemoteRegex
package repo
import (
"fmt"
"regexp"
"strings"
)
type Repo struct {
// The path of the Repoisotry. This could be
You can’t perform that action at this time.