Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
refactor(debug): simplify comments in List function and clean up inte…
…gration test
  • Loading branch information
UrielOfir committed Sep 13, 2025
commit edab15bdeaef95396f2c97c87b8526c739886b4f
3 changes: 1 addition & 2 deletions tpl/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ func (ns *Namespace) VisualizeSpaces(val any) string {
// List returns a string slice of field names and methods for structs/pointers,
// or keys for maps. This function uses reflection and is non-recursive.
// For structs and pointers to structs, it returns all exported field names and method names.
// Note: Method names are collected using reflect.PointerTo(t), which includes both value and pointer receiver methods.
// Method names include both value and pointer receiver methods.
// For maps, it returns all keys converted to strings.
// For other types, it returns an empty slice.
func (ns *Namespace) List(val any) []string {
func (ns *Namespace) List(val any) []string {
if val == nil {
return []string{}
Expand Down
2 changes: 0 additions & 2 deletions tpl/debug/debug_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ Nil: {{ debug.List nil }}
String: {{ debug.List "hello" }}
Number: {{ debug.List 42 }}
Slice: {{ debug.List (slice 1 2 3) }}


`
b := hugolib.TestRunning(t, files)

Expand Down