Last active
February 7, 2024 15:54
-
-
Save methane/cfdcce8257a6406dd2ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/ugorji/go/codec" | |
) | |
var mh = codec.MsgpackHandle{} | |
func main() { | |
mh.SignedInteger = false | |
data := []byte{0x2a} | |
dec := codec.NewDecoderBytes(data, &mh) | |
var dd interface{} | |
dec.MustDecode(&dd) | |
fmt.Printf("%+v, %T\n", dd, dd) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment