(e Expr)
| 226 | } |
| 227 | |
| 228 | func CopyExpr(e Expr) Expr { |
| 229 | if e == nil { |
| 230 | panic("CopyExpr nil") |
| 231 | } |
| 232 | b, err := json.Marshal(e) |
| 233 | if err != nil { |
| 234 | panic(err) |
| 235 | } |
| 236 | var copy Expr |
| 237 | if err := unpacker.Unmarshal(b, ©); err != nil { |
| 238 | panic(err) |
| 239 | } |
| 240 | return copy |
| 241 | } |
no test coverage detected