func Sha256Checksum(r io.Reader) ([]byte, error) {
	_, sum, err := ChecksumFrom(r, sha256.New())
	return sum, err
}
Sha256Checksum will return a sha256 checksum of r
package hash
import (
	"crypto/sha256"
	"encoding/json"
	"fmt"
	"hash"
	"hash/fnv"
	"io"
	"reflect"
	"github.com/cespare/xxhash"
)
func Values(objects ...interface{}) string {
	return hashValues(objects...)
}
func Modulo(sha string, num int) int {
	hasher := fnv.New32a()
	hasher.Write([]byte(sha))
	partition := int(hasher.Sum32()) % num
	if partition < 0 {
		partition = -partition
	}
	return partition
}
func hashValues(objects ...interface{}) string {
	h := xxhash.New()
	for _, o := range objects {
		if o == nil {
			io.WriteString(h, "")
			continue
		}
		switch s := o.(type) {
		case string:
			io.WriteString(h, s)
		case []byte:
			h.Write(s)
		case []string:
			for _, v := range s {
				io.WriteString(h, v)
			}
		case bool:
			if s {
				io.WriteString(h, "true")
			} else {
				io.WriteString(h, "false")
			}
		case int, int8, int16, int32, int64:
			fmt.Fprintf(h, "%d", s)
		case float32:
			if s == float32(int32(s)) {
				fmt.Fprintf(h, "%d", int32(s))
			} else {
				fmt.Fprintf(h, "%f", s)
			}
		case float64:
			if s == float64(int64(s)) {
				fmt.Fprintf(h, "%d", int64(s))
			} else {
				fmt.Fprintf(h, "%f", s)
			}
		case *string:
			if s == nil {
				io.WriteString(h, "")
			} else {
				io.WriteString(h, *s)
			}
		case *int:
			if s == nil {
				io.WriteString(h, "")
			} else {
				fmt.Fprintf(h, "%d", *s)
			}
		case *int8:
			if s == nil {
				io.WriteString(h, "")
			} else {
				fmt.Fprintf(h, "%d", *s)
			}
		case *int16:
			if s == nil {
				io.WriteString(h, "")
			} else {
				fmt.Fprintf(h, "%d", *s)
			}
		case *int32:
			if s == nil {
				io.WriteString(h, "")
			} else {
				fmt.Fprintf(h, "%d", *s)
			}
		case *int64:
			if s == nil {
				io.WriteString(h, "")
			} else {
				fmt.Fprintf(h, "%d", *s)
			}
		case *float32:
			if s == nil {
				io.WriteString(h, "")
			} else {
				if *s == float32(int32(*s)) {
					fmt.Fprintf(h, "%d", int32(*s))
				} else {
					fmt.Fprintf(h, "%f", *s)
				}
			}
		case *float64:
			if s == nil {
				io.WriteString(h, "")
			} else {
				if *s == float64(int64(*s)) {
					fmt.Fprintf(h, "%d", int64(*s))
				} else {
					fmt.Fprintf(h, "%f", *s)
				}
			}
		case *bool:
			if s == nil {
				io.WriteString(h, "")
			} else {
				fmt.Fprintf(h, "%v", *s)
			}
		default:
			t := reflect.TypeOf(s)
			k := t.Kind()
			if k == reflect.Ptr {
				s = reflect.ValueOf(s).Interface()
				k = reflect.Interface
			}
			switch k {
			case reflect.Struct, reflect.Slice, reflect.Interface:
				buf, _ := json.Marshal(s)
				h.Write(buf)
			default:
				fmt.Fprintf(h, "%v", s)
			}
		}
	}
	return fmt.Sprintf("%016x", h.Sum64())
}