Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
echo -n "Checking platform: "
if [[ "$OSTYPE" == "linux-gnu" ]]; then
echo "linux"
URL=$(curl -s https://api.github.com/repos/otm/git-build-state/releases/latest | grep browser_| grep linux_amd64 | awk '{print $2}' | tr -d '"')
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "mac"
package main
import (
"bytes"
"fmt"
"math"
"strings"
"time"
"github.com/coreos/etcd/raft"