The controller imports mesh-host/validate through a replace onto the forge that holds it, and every build — the build agent's go build in a fresh toolchain container, the Dockerfile's go mod download — would have fetched it through the public proxy and checksum database at build time: a merge breaking main on the network, the class Phase 1 removes. vendor/ is committed; go builds from it with nothing fetched, and refuses to build when it and go.mod disagree, so a pin moved without go mod vendor fails at once. The Dockerfile copies vendor/ and builds with GOPROXY=off.
38 lines
663 B
Go
38 lines
663 B
Go
package pgproto3
|
|
|
|
import (
|
|
"encoding/binary"
|
|
)
|
|
|
|
type BigEndianBuf [8]byte
|
|
|
|
func (b BigEndianBuf) Int16(n int16) []byte {
|
|
buf := b[0:2]
|
|
binary.BigEndian.PutUint16(buf, uint16(n))
|
|
return buf
|
|
}
|
|
|
|
func (b BigEndianBuf) Uint16(n uint16) []byte {
|
|
buf := b[0:2]
|
|
binary.BigEndian.PutUint16(buf, n)
|
|
return buf
|
|
}
|
|
|
|
func (b BigEndianBuf) Int32(n int32) []byte {
|
|
buf := b[0:4]
|
|
binary.BigEndian.PutUint32(buf, uint32(n))
|
|
return buf
|
|
}
|
|
|
|
func (b BigEndianBuf) Uint32(n uint32) []byte {
|
|
buf := b[0:4]
|
|
binary.BigEndian.PutUint32(buf, n)
|
|
return buf
|
|
}
|
|
|
|
func (b BigEndianBuf) Int64(n int64) []byte {
|
|
buf := b[0:8]
|
|
binary.BigEndian.PutUint64(buf, uint64(n))
|
|
return buf
|
|
}
|