ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.87k stars 295 forks source link

codecgen creating broken init() function #45

Closed cms103 closed 9 years ago

cms103 commented 9 years ago

Running codecgen results in the following output:

func init() {
if codec1978.GenVersion != 1 {
_, file, _, _ := runtime.Caller(0)
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", 
1, codec1978.GenVersion, file)
panic(err)
}
if false { // reference the types, but skip this branch at build/run time
 = } 
}

The stray = on the penultimate line is incorrect and stops compilation. Removing this seems to result in correct code.