(i int64)
| 454 | } |
| 455 | |
| 456 | func encodeInt(i int64) ([]byte, error) { |
| 457 | var ( |
| 458 | buf [binary.MaxVarintLen64]byte |
| 459 | iEncoded = buf[:] |
| 460 | ) |
| 461 | iEncoded = iEncoded[:binary.PutVarint(iEncoded, i)] |
| 462 | |
| 463 | if len(iEncoded) == 0 { |
| 464 | return nil, fmt.Errorf("failed encoding integer = %v", i) |
| 465 | } |
| 466 | return iEncoded, nil |
| 467 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…