Skip to content

[Go] log prints memory address of the ActionDef.Name func #3643

@janishorsts

Description

@janishorsts

Describe the bug
slog prints a debug message with the memory address of the function ActionDef.Name.

ActionDef.Name is a function, not a string type.

// Name returns the Action's Name.
func (a *ActionDef[In, Out, Stream]) Name() string { return a.desc.Name }

To Reproduce

// enable debug
slog.SetLogLoggerLevel(slog.LevelDebug)

2025/09/25 17:56:08 DEBUG Action.Run name=0x102e32910 ...

Expected behavior

2025/09/25 17:56:08 DEBUG Action.Run name=getWeather ...

Runtime (please complete the following information):

  • OS: MacOS
  • Version 26

** Go version

  • go version go1.25.1 darwin/arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggo

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions