parent
d3a92e398b
commit
17ad86642a
@ -1,8 +1,8 @@ |
||||
mfer/*.pb.go |
||||
/mfer.cmd |
||||
vendor |
||||
/tmp |
||||
*.tmp |
||||
*.docker.tzst |
||||
*.tzst |
||||
/builddeps/modcache.tar |
||||
/vendor |
||||
|
@ -1,21 +0,0 @@ |
||||
## build image: |
||||
FROM golang:1.19.3-bullseye AS builder |
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive |
||||
RUN apt update && apt install -y make bzip2 curl unzip |
||||
RUN mkdir -p /build |
||||
WORKDIR /build |
||||
|
||||
# install newer protoc |
||||
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v21.10/protoc-21.10-linux-aarch_64.zip && \ |
||||
unzip *.zip -d /usr/local && rm -v *.zip && protoc --version |
||||
|
||||
RUN go install -v google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1 |
||||
|
||||
RUN go env |
||||
|
||||
COPY ./go.mod . |
||||
COPY ./go.sum . |
||||
|
||||
RUN --mount=type=cache,target=/go/pkg go mod download -x |
||||
RUN rm -rfv /var/cache/* /var/tmp/* |
@ -0,0 +1,11 @@ |
||||
package bork |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/stretchr/testify/assert" |
||||
) |
||||
|
||||
func TestBuild(t *testing.T) { |
||||
assert.NotNil(t, ErrMissingMagic) |
||||
} |
@ -1,32 +0,0 @@ |
||||
package cli |
||||
|
||||
import "fmt" |
||||
|
||||
// FIXME make this write to a bytes.Buffer with fprintf
|
||||
func DumpByteSlice(b []byte) { |
||||
var a [16]byte |
||||
n := (len(b) + 15) &^ 15 |
||||
for i := 0; i < n; i++ { |
||||
if i%16 == 0 { |
||||
fmt.Printf("%4d", i) |
||||
} |
||||
if i%8 == 0 { |
||||
fmt.Print(" ") |
||||
} |
||||
if i < len(b) { |
||||
fmt.Printf(" %02X", b[i]) |
||||
} else { |
||||
fmt.Print(" ") |
||||
} |
||||
if i >= len(b) { |
||||
a[i%16] = ' ' |
||||
} else if b[i] < 32 || b[i] > 126 { |
||||
a[i%16] = '.' |
||||
} else { |
||||
a[i%16] = b[i] |
||||
} |
||||
if i%16 == 15 { |
||||
fmt.Printf(" %s\n", string(a[:])) |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,12 @@ |
||||
package log |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/stretchr/testify/assert" |
||||
) |
||||
|
||||
func TestBuild(t *testing.T) { |
||||
Init() |
||||
assert.True(t, true) |
||||
} |
Loading…
Reference in new issue