Example #1
0
File: scan.go Project: amery/gorepo
func repo_scan() int {
	var depth uint = REPO_SCAN_DEPTH
	excludes := []string{".repo", "downloads"}
	m := manifest.NewManifest(nil)

	for r := range tree.Scan(".", depth, int(depth/2), excludes) {
		m.AddProjectByPath(r.Path, r.Repository)
	}

	return 0
}
Example #2
0
File: list.go Project: amery/gorepo
func repo_list() int {
	var depth uint = REPO_LIST_SCAN_DEPTH
	excludes := []string{".repo"}
	ret := 1

	for r := range tree.Scan(".", depth, int(depth/2), excludes) {
		fmt.Printf("%s\n", r.Path)
		ret = 0
	}

	return ret
}