1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:14:39 -07:00

refactor/importgraph: document that graphs are cyclic

Change-Id: I195656b523488433945b3215558c3442cf45b2bd
Reviewed-on: https://go-review.googlesource.com/19831
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
Alan Donovan 2016-02-22 15:26:12 -05:00
parent 51464e57af
commit ac02106e04

View File

@ -20,6 +20,8 @@ import (
// imported packages (prerequisites); for a reverse graph, it is the set // imported packages (prerequisites); for a reverse graph, it is the set
// of importing packages (clients). // of importing packages (clients).
// //
// Graph construction inspects all imports in each package's directory,
// including those in _test.go files, so the resulting graph may be cyclic.
type Graph map[string]map[string]bool type Graph map[string]map[string]bool
func (g Graph) addEdge(from, to string) { func (g Graph) addEdge(from, to string) {