func ParseID(s string) (ID, error) {
	var id ID

	for len(s) > 0 && s[0] == 'I' {
		id.indirection++

		s = s[1:]
	}

	if len(s) > 0 && s[0] == 'Z' {
		id.compression = true

		s = s[1:]
	}

	if len(s) > 0 && s[0] == 'D' {
		// no-op, legacy case
		s = s[1:]
	}

	if id.indirection > 0 && id.compression {
		return id, errors.Errorf("malformed object ID - compression and indirection are mutually exclusive")
	}

	cid, err := index.ParseID(s)
	if err != nil {
		return id, errors.Wrapf(err, "malformed content ID: %q", s)
	}

	id.cid = cid

	return id, nil
}
// ParseID converts the specified string into object ID.
ParseID converts the specified string into object ID.
// ParseID converts the specified string into object ID .
func ParseID(s string) (ID, error) {
	var id ID
	for len(s) > 0 && s[0] == 'I' {
		id.indirection++
		s = s[1:]
	}
	if len(s) > 0 && s[0] == 'Z' {
		id.compression = true
		s = s[1:]
	}
	if len(s) > 0 && s[0] == 'D' {
		s = s[1:]
	}
	if id.indirection > 0 && id.compression {
		return id, errors.Errorf("malformed object ID - compression and indirection are mutually exclusive")
	}
	cid, err := index.ParseID(s)
	if err != nil {
		return id, errors.Wrapf(err, "malformed content ID: %q", s)
	}
	id.cid = cid
	return id, nil
}
func ParseID ( s string ) ( ID , error ) { var id ID for len ( s ) > 0 && s [ 0 ] == 'I' { id . indirection ++ s = s [ 1 : ] } if len ( s ) > 0 && s [ 0 ] == 'Z' { id . compression = true s = s [ 1 : ] } if len ( s ) > 0 && s [ 0 ] == 'D' { s = s [ 1 : ] } if id . indirection > 0 && id . compression { return id , errors . Errorf ( " " ) } cid , err := index . ParseID ( s ) if err != nil { return id , errors . Wrapf ( err , " " , s ) } id . cid = cid return id , nil }
ParseID converts the specified string into object ID.
ParseID converts the specified string into object ID .
// no-op, legacy case