INNER CODE UNIT · Go

func

cc1a2b/JShunter · internal/jshunter/chunkgraph.go:114

func (g *ChunkGraph) addChunk(c ChunkRef, seen map[string]struct{}) {
	if len(g.Chunks) >= cgMaxChunks || !cgValidChunkPath(c.Path) {
		return
	}
	if _, dup := seen[c.Path]; dup {
		return
	}
	seen[c.Path] = struct{}{}
	g.Chunks = append(g.Chunks, c)
}

func (g *ChunkGraph) addRoute(r RouteRef, seen map[string]struct{}) {
	if len(g.Routes) >= cgMaxRoutes || !cgValidRoutePath(r.Path) {
		return
	}
	if _, dup := seen[r.Path]; dup {
		return
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…