func GetLocalSHA()

in validatechecksum.go [22:36]


func GetLocalSHA(filename string) (string, error) {
	f, openErr := os.Open(filename)
	if openErr != nil {
		log.Printf("ERROR GetLocalSHA could not open %s: %s", filename, openErr)
		return "", openErr
	}
	defer f.Close()

	h := sha1.New()
	if _, err := io.Copy(h, f); err != nil {
		log.Printf("ERROR GetLocalSHA could not read local file %s: %s", filename, err)
		return "", err
	}
	return base64.StdEncoding.EncodeToString(h.Sum(nil)), nil
}