code: func validPkgInfo(info string) (doc.RevisionType, string, error) {
  	if len(info) == 0 {
  		return doc.BRANCH, "", nil
  	}
  
  	infos := strings.Split(info, ":")
  
  	if len(infos) == 2 {
  		tp := doc.RevisionType(infos[0])
  		val := infos[1]
  		switch tp {
  		case doc.BRANCH, doc.COMMIT, doc.TAG:
  		default:
  			return "", "", fmt.Errorf("invalid node type: %v", tp)
  		}
  		return tp, val, nil
  	}
  	return "", "", fmt.Errorf("cannot parse dependency version: %v", info)
  }
docs: // validPkgInfo checks if the information of the package is valid.