lang: funcs: Make printable function names more unique

This helps a lot with debugging.
This commit is contained in:
James Shubin
2023-03-24 16:50:01 -04:00
parent c598e4d289
commit 8a463767bf
3 changed files with 3 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ type PrintfFunc struct {
// String returns a simple name for this function. This is needed so this struct
// can satisfy the pgraph.Vertex interface.
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.

View File

@@ -85,7 +85,7 @@ type WrappedFunc struct {
// String returns a simple name for this function. This is needed so this struct
// can satisfy the pgraph.Vertex interface.
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.

View File

@@ -148,7 +148,7 @@ type WrappedFunc struct {
// String returns a simple name for this function. This is needed so this struct
// can satisfy the pgraph.Vertex interface.
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.