示例#1
0
文件: builder.go 项目: jayschwa/gddo
func removeAssociations(dpkg *doc.Package) {
	for _, t := range dpkg.Types {
		dpkg.Funcs = append(dpkg.Funcs, t.Funcs...)
		t.Funcs = nil
	}
	sort.Sort(byFuncName(dpkg.Funcs))
}
示例#2
0
func untangleDoc(dpkg *doc.Package) {
	for _, t := range dpkg.Types {
		dpkg.Consts = append(dpkg.Consts, t.Consts...)
		t.Consts = nil
		dpkg.Vars = append(dpkg.Vars, t.Vars...)
		t.Vars = nil
		dpkg.Funcs = append(dpkg.Funcs, t.Funcs...)
		t.Funcs = nil
	}
}
示例#3
0
文件: loader.go 项目: garyburd/vigor
func untangleDoc(pkg *godoc.Package) {
	for _, t := range pkg.Types {
		pkg.Consts = append(pkg.Consts, t.Consts...)
		t.Consts = nil
		pkg.Vars = append(pkg.Vars, t.Vars...)
		t.Vars = nil
		pkg.Funcs = append(pkg.Funcs, t.Funcs...)
		t.Funcs = nil
	}
}