vscode-go
vscode-go copied to clipboard
debug: add bytes view as hex values
Branching out of the follow-up discussion on https://github.com/golang/vscode-go/issues/1459#issuecomment-873969040:
Option 1:
b: []uint8 len: 5, cap: 5, [72,101,108,108,111]
string(): "Hello"
%X: [68,65,6C,6C,6F]
[0]: 104
[1]: 101
[2]: 108
[3]: 108
[4]: 111
Option 2:
b: []uint8 len: 5, cap: 5, [72,101,108,108,111]
string(): "Hello"
[0]: 104 = 0x68 = h
[1]: 101 = 0x65 = e
[2]: 108 = 0x6c = l
[3]: 108 = 0x6c = l
[4]: 111 = 0x6f = o