示例#1
0
文件: pipeline.go 项目: benjyw/kythe
func writeDecor(ctx context.Context, t table.BufferedProto, decor *srvpb.FileDecorations, targets map[string]*srvpb.Node) error {
	for _, n := range targets {
		decor.Target = append(decor.Target, n)
	}
	sort.Sort(assemble.ByOffset(decor.Decoration))
	sort.Sort(assemble.ByTicket(decor.Target))
	sort.Sort(assemble.ByAnchorTicket(decor.TargetDefinitions))
	return t.Put(ctx, xsrv.DecorationsKey(decor.File.Ticket), decor)
}
示例#2
0
文件: pipeline.go 项目: jwatt/kythe
func writeDecor(ctx context.Context, t table.BufferedProto, decor *srvpb.FileDecorations) error {
	sort.Sort(assemble.ByOffset(decor.Decoration))
	return t.Put(ctx, xsrv.DecorationsKey(decor.File.Ticket), decor)
}