@@ -19,10 +19,10 @@ func PathNew(nodes []interface{}, edges []interface{}) Path {
1919	for  i  :=  0 ; i  <  len (edges ); i ++  {
2020		Edges [i ] =  edges [i ].(* Edge )
2121	}
22- 	 
23- 	return  Path {	 
24- 		Edges   : Edges ,
25- 		Nodes   : Nodes ,
22+ 
23+ 	return  Path {
24+ 		Edges : Edges ,
25+ 		Nodes : Nodes ,
2626	}
2727}
2828
@@ -38,7 +38,7 @@ func (p Path) GetNode(index int) *Node {
3838	return  p .Nodes [index ]
3939}
4040
41- func  (p  Path ) GetEdge (index  int ) * Edge {
41+ func  (p  Path ) GetEdge (index  int ) * Edge   {
4242	return  p .Edges [index ]
4343}
4444
@@ -63,16 +63,15 @@ func (p Path) String() string {
6363	edgeCount  :=  p .EdgeCount ()
6464	for  i  :=  0 ; i  <  edgeCount ; i ++  {
6565		var  node  =  p .GetNode (i )
66- 		s  =  append (s , "("   , fmt .Sprintf ("%v" , node .ID )  , ")" )
66+ 		s  =  append (s , "(" , fmt .Sprintf ("%v" , node .ID ), ")" )
6767		var  edge  =  p .GetEdge (i )
6868		if  node .ID  ==  edge .srcNodeID  {
69- 			s  =  append (s , "-["   , fmt .Sprintf ("%v" , edge .ID )  , "]->" )
69+ 			s  =  append (s , "-[" , fmt .Sprintf ("%v" , edge .ID ), "]->" )
7070		} else  {
71- 			s =  append (s , "<-["   , fmt .Sprintf ("%v" , edge .ID )  , "]-" )
71+ 			s   =  append (s , "<-[" , fmt .Sprintf ("%v" , edge .ID ), "]-" )
7272		}
7373	}
74- 	s  =  append (s , "("  , fmt .Sprintf ("%v" , p .GetNode (edgeCount ).ID ) , ")" )
75- 	s  =  append (s , ">" )
74+ 	s  =  append (s , "(" , fmt .Sprintf ("%v" , p .GetNode (edgeCount ).ID ), ")" , ">" )
7675
7776	return  strings .Join (s , "" )
7877}
0 commit comments