示例#1
0
文件: scan.go 项目: 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
}
示例#2
0
文件: list.go 项目: 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
}