func GetShaAndSize(id string) (string, int64, error) {
	s, err := splitID(id)
	if err != nil {
		return "", 0, err
	}
	size, err := strconv.ParseInt(s[2], 10, 64)
	if err != nil {
		return "", 0, err
	}
	return s[1], size, nil
}
Get sha and size components from valid bazel SnapshotID
package bazel
import (
	"fmt"
	"strconv"
	"strings"
	"github.com/twitter/scoot/bazel/remoteexecution"
)
func SnapshotID(sha string, size int64) string {
	return fmt.Sprintf("%s-%s-%d", SnapshotIDPrefix, sha, size)
}
func SnapshotIDFromDigest(d *remoteexecution.Digest) string {
	if d == nil {
		return ""
	}
	return SnapshotID(d.GetHash(), d.GetSizeBytes())
}
func ValidateID(id string) error {
	sha, size, err := GetShaAndSize(id)
	if err != nil {
		return err
	}
	if !IsValidDigest(sha, size) {
		return fmt.Errorf("Error: Invalid digest. SHA: %s, size: %d", sha, size)
	}
	return nil
}