Skip to content

Conversation

@trim21
Copy link

@trim21 trim21 commented May 9, 2025

This will allow user to marshal error stack like this, without using json marshaler:

{
  "error": "a: raw error",
  "stack": [
    {
      "function": "main.a",
      "file": "./main.go",
      "lino": 23
    },
    {
      "function": "main.main",
      "file": "./main.go",
      "lino": 19
    },
    {
      "function": "runtime.main",
      "file": "runtime/proc.go",
      "lino": 283
    },
    {
      "function": "runtime.goexit",
      "file": "runtime/asm_amd64.s",
      "lino": 1700
    }
  ]
}

@trim21 trim21 changed the title feat: allow to use array as error stack feat: allow to use a LogArrayMarshaler as error stacks May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant