Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first
issue it finds, so please do not limit your consideration to the contents of the below message.
function call which takes a reference to r at line 1698 may start a goroutine
Click here to show the 32 line(s) of Go which triggered the analyzer.
```go
for _, r := range []RawExt{
{Tag: 99, Value: "9999", Data: []byte("9999")},
} {
e := NewEncoderBytes(&b, h)
e.MustEncode(&r)
// fmt.Printf(">>>> rawext: isnil? %v, %d - %v\n", b == nil, len(b), b)
d := NewDecoderBytes(b, h)
d.MustDecode(&v)
var r2 = r
switch {
case isJson:
r2.Tag = 0
r2.Data = nil
case isCbor:
r2.Data = nil
default:
r2.Value = nil
}
testDeepEqualErr(v, r2, t, "rawext-default")
// switch h.(type) {
// case *JsonHandle:
// testDeepEqualErr(r.Value, v, t, "rawext-json")
// default:
// var r2 = r
// if isValuer {
// r2.Data = nil
// } else {
// r2.Value = nil
// }
// testDeepEqualErr(v, r2, t, "rawext-default")
// }
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a Bug :-1:, Mitigated :+1:, or Desirable Behavior :rocket:
See the descriptions of the classifications here for more information.
Found a possible issue in dachengzao/golangBBS at vendor/github.com/ugorji/go/codec/codec_test.go
Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.
Click here to see the code in its original context.
Click here to show the 32 line(s) of Go which triggered the analyzer.
```go for _, r := range []RawExt{ {Tag: 99, Value: "9999", Data: []byte("9999")}, } { e := NewEncoderBytes(&b, h) e.MustEncode(&r) // fmt.Printf(">>>> rawext: isnil? %v, %d - %v\n", b == nil, len(b), b) d := NewDecoderBytes(b, h) d.MustDecode(&v) var r2 = r switch { case isJson: r2.Tag = 0 r2.Data = nil case isCbor: r2.Data = nil default: r2.Value = nil } testDeepEqualErr(v, r2, t, "rawext-default") // switch h.(type) { // case *JsonHandle: // testDeepEqualErr(r.Value, v, t, "rawext-json") // default: // var r2 = r // if isValuer { // r2.Data = nil // } else { // r2.Value = nil // } // testDeepEqualErr(v, r2, t, "rawext-default") // } } ```Leave a reaction on this issue to contribute to the project by classifying this instance as a Bug :-1:, Mitigated :+1:, or Desirable Behavior :rocket: See the descriptions of the classifications here for more information.
commit ID: 2d9d122019c9d0439d9e582f2739f374e117f788