Beispiel #1
0
func findChildRefs(parent *importer.Object) ([]blob.Ref, error) {
	childRefs := []blob.Ref{}
	var err error
	parent.ForeachAttr(func(key, value string) {
		if strings.HasPrefix(key, "camliPath:") {
			if br, ok := blob.Parse(value); ok {
				childRefs = append(childRefs, br)
				return
			}
			if err == nil {
				err = fmt.Errorf("invalid blobRef for %s attribute of %v: %q", key, parent, value)
			}
		}
	})
	return childRefs, err
}