Skip to content

Commit

Permalink
build: turn off cgo, duh
Browse files Browse the repository at this point in the history
  • Loading branch information
AJ ONeal committed Mar 12, 2022
1 parent 6d73209 commit 10a3ef7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ builds:
- id: dashmsg-default
main: ./cmd/dashmsg/
env:
- CGO_ENABLED=1
- CGO_ENABLED=0
goos:
- darwin
#- linux
#- windows
- linux
- windows
goarch:
- amd64
- arm64
Expand Down
4 changes: 3 additions & 1 deletion dashmsg.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@ func DoubleHash(buf []byte) []byte {
}

// EncodeToBCVarint is a special variable-width byte encoding for 8, 16, 32, or 64-bit integers. For integers less than 253 bytes it uses a single bit. 253, 254, and 255 signify a 16, 32, and 64-bit (2, 4, and 8-byte) little-endian encodings respectively.
func EncodeToBCVarint(n int) []byte {
func EncodeToBCVarint(m int) []byte {
// See https://wiki.bitcoinsv.io/index.php/VarInt
var buf []byte

n := int64(m)

if n < 253 {
buf = make([]byte, 1)
buf[0] = byte(n)
Expand Down

0 comments on commit 10a3ef7

Please sign in to comment.