pgraph: Remove use of Flags struct in favour of Value API

One small step to completely cleaning up the pgraph package so that we
can eventually fix the code that would otherwise create a cycle!
This commit is contained in:
James Shubin
2017-05-13 12:04:49 -04:00
parent d11854f4e8
commit 70e7ee2d46
6 changed files with 51 additions and 27 deletions

View File

@@ -42,11 +42,6 @@ const (
graphStatePaused
)
// Flags contains specific constants used by the graph.
type Flags struct {
Debug bool
}
// Graph is the graph structure in this library.
// The graph abstract data type (ADT) is defined as follows:
// * the directed graph arrows point from left to right ( -> )
@@ -60,7 +55,6 @@ type Graph struct {
kv map[string]interface{} // some values associated with the graph
// legacy
Flags Flags
state graphState
fastPause bool // used to disable pokes for a fast pause
mutex *sync.Mutex // used when modifying graph State variable
@@ -158,7 +152,6 @@ func (g *Graph) Copy() *Graph {
kv: g.kv,
// legacy
Flags: g.Flags,
state: g.state,
mutex: g.mutex,
wg: g.wg,