Skip to content

Commit

Permalink
go 1.18
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jul 11, 2022
1 parent a0b6331 commit 64a38aa
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 21 deletions.
31 changes: 23 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,41 @@ run:

build-tags:
- dfrunsecurity
- dfrunnetwork

linters:
enable:
- gofmt
- govet
- deadcode
- depguard
- gofmt
- goimports
- gosimple
- revive
- govet
- importas
- ineffassign
- misspell
- unused
- varcheck
- golint
- staticcheck
- typecheck
- structcheck
- typecheck
- unused
- varcheck
- bodyclose
- errname
- makezero
- whitespace
disable-all: true

linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
# The io/ioutil package has been deprecated.
# https://go.dev/doc/go1.16#ioutil
- io/ioutil

issues:
exclude-rules:
- linters:
- golint
- revive
text: "stutters"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1.3-labs
# syntax=docker/dockerfile:1

ARG GO_VERSION=1.17
ARG GO_VERSION=1.18

ARG ALPINE_VERSION=3.16
ARG ALPINE_BASE=alpine:${ALPINE_VERSION}
Expand Down
1 change: 1 addition & 0 deletions cmd/binfmt/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package main
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/tonistiigi/binfmt

go 1.17
go 1.18

require (
github.com/containerd/containerd v1.5.8
Expand Down
6 changes: 3 additions & 3 deletions hack/dockerfiles/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1.2
# syntax=docker/dockerfile:1

FROM golang:1.17-alpine
FROM golang:1.18-alpine
RUN apk add --no-cache gcc musl-dev
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.39.0
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.45.0
WORKDIR /go/src/github.com/tonistiigi/binfmt
RUN --mount=target=. --mount=target=/root/.cache,type=cache \
golangci-lint run
5 changes: 3 additions & 2 deletions hack/dockerfiles/vendor.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# syntax = docker/dockerfile:1.2
FROM golang:1.17-alpine AS vendored
# syntax=docker/dockerfile:1

FROM golang:1.18-alpine AS vendored
RUN apk add --no-cache git
WORKDIR /src
RUN --mount=target=/src,rw \
Expand Down
8 changes: 4 additions & 4 deletions test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#syntax=docker/dockerfile:1.3-labs
#syntax=docker/dockerfile:1-labs

FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.0 AS xx
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.1.1 AS xx

FROM scratch AS src
COPY *.go go.* /

FROM --platform=$BUILDPLATFORM golang:1.17-alpine AS build
FROM --platform=$BUILDPLATFORM golang:1.18-alpine AS build
COPY --from=xx / /
RUN apk add clang lld file
ARG TARGETPLATFORM
Expand All @@ -27,4 +27,4 @@ COPY --from=binary / /usr/bin
ARG CONFIG_RT_GROUP_SCHED
RUN --security=insecure REEXEC_NAME=/usr/bin/test /usr/bin/test -test.v

FROM binary
FROM binary
2 changes: 1 addition & 1 deletion test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/tonistiigi/binfmt/test

go 1.17
go 1.18

require (
github.com/stretchr/testify v1.7.0
Expand Down

0 comments on commit 64a38aa

Please sign in to comment.