File tree 3 files changed +27
-4
lines changed 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 1
1
version : 2
2
2
jobs :
3
3
build :
4
+ working_directory : $HOME/go/src/github.com/ChainSafeSystems/go-pre
4
5
docker :
5
6
- image : circleci/golang:1.11
6
7
7
8
steps :
8
- - checkout
9
+ - checkout :
10
+ path : $HOME/go/src/github.com/ChainSafeSystems/go-pre
11
+ - attach_workspace :
12
+ at : $HOME/go/src/github.com/ChainSafeSystems/go-pre
13
+
9
14
- run : go get -v -t -d ./...
10
- - run : go test -v ./...
15
+ - run : go test -v ./...
16
+ - run : gometalinter ./...
17
+
18
+
Original file line number Diff line number Diff line change
1
+ FROM golang:1.11.5-alpine3.8 as build
2
+
3
+ RUN apk --no-cache add git linux-headers ca-certificates
4
+ COPY . /go/src/github.com/ChainSafeSystems/go-pre
5
+ WORKDIR /go/src/github.com/ChainSafeSystems/go-pre
6
+ ENV GO111MODULE=off
7
+ RUN go install -v ./...
8
+ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o go-pre .
9
+
10
+
11
+ FROM scratch
12
+
13
+ WORKDIR /
14
+ COPY --from=builder ./go/src/github.com/ChainSafeSystems/go-pre/go-pre .
15
+ CMD ["./go-pre" ]
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func encodeInteger(i int) ([]byte, error) {
56
56
o := make ([]byte , 4 )
57
57
binary .LittleEndian .PutUint32 (o , uint32 (i << 2 )+ 2 )
58
58
return o , nil
59
- }
59
+ }
60
60
61
61
// TODO: this case only works for integers between 2**30 and 2**64 due to the fact that Go's integers only hold up
62
62
// to 2 ** 64. need to implement this case for integers > 2**64 using the big.Int library
@@ -89,6 +89,6 @@ func encodeInteger(i int) ([]byte, error) {
89
89
func encodeBool (l bool ) ([]byte , error ) {
90
90
if l {
91
91
return []byte {0x01 }, nil
92
- }
92
+ }
93
93
return []byte {0x00 }, nil
94
94
}
You can’t perform that action at this time.
0 commit comments