func NewIntOrStringFromString(val string) IntOrString {
	return IntOrString{Kind: IntstrString, StrVal: val}
}
NewIntOrStringFromString creates an IntOrString object with a string value.
package util
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"path"
	"reflect"
	"regexp"
	"runtime"
	"strconv"
	"strings"
	"time"
	"github.com/golang/glog"
)
var ReallyCrash bool
var PanicHandlers = []func(interface{}){logPanic}
func HandleCrash() {
	if ReallyCrash {
		return
	}
	if r := recover(); r != nil {
		for _, fn := range PanicHandlers {
			fn(r)
		}
	}
}
func logPanic(r interface{}) {
	callers := ""
	for i := 0; true; i++ {
		_, file, line, ok := runtime.Caller(i)
		if !ok {
			break
		}
		callers = callers + fmt.Sprintf("%v:%v\n", file, line)
	}
	glog.Infof("Recovered from panic: %#v (%v)\n%v", r, r, callers)
}
var ErrorHandlers = []func(error){logError}
func HandleError(err error) {
	for _, fn := range ErrorHandlers {
		fn(err)
	}
}
func logError(err error) {
	glog.ErrorDepth(2, err)
}
func Forever(f func(), period time.Duration) {
	Until(f, period, nil)
}
func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
	for {
		select {
		case <-stopCh:
			return
		default:
		}
		func() {
			defer HandleCrash()
			f()
		}()
		time.Sleep(period)
	}
}
type IntOrString struct {
	Kind   IntstrKind
	IntVal int
	StrVal string
}
type IntstrKind int
const (
	IntstrInt    IntstrKind = iota  
	IntstrString                    
)
func NewIntOrStringFromInt(val int) IntOrString {
	return IntOrString{Kind: IntstrInt, IntVal: val}
}