lang: funcs: Make printable function names more unique
This helps a lot with debugging.
This commit is contained in:
@@ -62,7 +62,7 @@ type PrintfFunc struct {
|
|||||||
// String returns a simple name for this function. This is needed so this struct
|
// String returns a simple name for this function. This is needed so this struct
|
||||||
// can satisfy the pgraph.Vertex interface.
|
// can satisfy the pgraph.Vertex interface.
|
||||||
func (obj *PrintfFunc) String() string {
|
func (obj *PrintfFunc) String() string {
|
||||||
return PrintfFuncName
|
return fmt.Sprintf("%s@%p", PrintfFuncName, obj) // be more unique!
|
||||||
}
|
}
|
||||||
|
|
||||||
// ArgGen returns the Nth arg name for this function.
|
// ArgGen returns the Nth arg name for this function.
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ type WrappedFunc struct {
|
|||||||
// String returns a simple name for this function. This is needed so this struct
|
// String returns a simple name for this function. This is needed so this struct
|
||||||
// can satisfy the pgraph.Vertex interface.
|
// can satisfy the pgraph.Vertex interface.
|
||||||
func (obj *WrappedFunc) String() string {
|
func (obj *WrappedFunc) String() string {
|
||||||
return obj.Name
|
return fmt.Sprintf("%s@%p", obj.Name, obj) // be more unique!
|
||||||
}
|
}
|
||||||
|
|
||||||
// ArgGen returns the Nth arg name for this function.
|
// ArgGen returns the Nth arg name for this function.
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ type WrappedFunc struct {
|
|||||||
// String returns a simple name for this function. This is needed so this struct
|
// String returns a simple name for this function. This is needed so this struct
|
||||||
// can satisfy the pgraph.Vertex interface.
|
// can satisfy the pgraph.Vertex interface.
|
||||||
func (obj *WrappedFunc) String() string {
|
func (obj *WrappedFunc) String() string {
|
||||||
return obj.Name
|
return fmt.Sprintf("%s@%p", obj.Name, obj) // be more unique!
|
||||||
}
|
}
|
||||||
|
|
||||||
// ArgGen returns the Nth arg name for this function.
|
// ArgGen returns the Nth arg name for this function.
|
||||||
|
|||||||
Reference in New Issue
Block a user