Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.18 #592

Merged
merged 1 commit into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
run:
timeout: 10m
build-tags:
- containers_image_openpgp
- exclude_graphdriver_btrfs
- exclude_graphdriver_devicemapper

linters:
enable:
- deadcode
- depguard
- gofmt
- goimports
- revive
- govet
- importas
- ineffassign
- misspell
- typecheck
- varcheck
- 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
importas:
no-unaliased: true

issues:
exclude-rules:
- linters:
- 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-labs
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.17"
ARG GO_VERSION="1.18"
ARG GORELEASER_XX_VERSION="1.2.5"

FROM --platform=$BUILDPLATFORM crazymax/goreleaser-xx:${GORELEASER_XX_VERSION} AS goreleaser-xx
Expand Down
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (s *ServeCmd) Run(ctx *Context) error {
log.Info().Str("version", version).Msgf("Starting %s", ctx.Meta.Name)

// Handle os signals
channel := make(chan os.Signal)
channel := make(chan os.Signal, 1)
signal.Notify(channel, os.Interrupt, utl.SIGTERM)
go func() {
sig := <-channel
Expand Down
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "GO_VERSION" {
default = "1.17"
default = "1.18"
}

// GITHUB_REF is the actual ref that triggers the workflow
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/crazy-max/diun/v4

go 1.17
go 1.18

require (
github.com/AlecAivazis/survey/v2 v2.3.4
Expand Down
553 changes: 0 additions & 553 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions hack/gen.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1-labs
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.17"
ARG GO_VERSION="1.18"
ARG PROTOC_VERSION="3.17.3"
ARG GLIBC_VERSION="2.33-r0"

Expand Down
7 changes: 4 additions & 3 deletions hack/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.17"
ARG GOLANGCI_LINT_VERSION="v1.37"
ARG GO_VERSION="1.18"
ARG GOLANGCI_LINT_VERSION="v1.45"

FROM golang:${GO_VERSION}-alpine AS base
ENV GOFLAGS="-buildvcs=false"
RUN apk add --no-cache gcc linux-headers musl-dev
WORKDIR /src

Expand All @@ -12,4 +13,4 @@ FROM base AS lint
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint run --timeout 10m0s ./...
golangci-lint run ./...
4 changes: 2 additions & 2 deletions hack/vendor.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1-labs
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.17"
ARG GO_VERSION="1.18"
ARG GOMOD_OUTDATED_VERSION="v0.8.0"

FROM golang:${GO_VERSION}-alpine AS base
Expand Down
2 changes: 1 addition & 1 deletion internal/notif/teams/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Sections struct {
Facts []Fact `json:"facts"`
}

// Fact is grouping data togheter to create a nested json element containg a name and an associated value
// Fact is grouping data together to create a nested json element containing a name and an associated value
type Fact struct {
Name string `json:"Name"`
Value string `json:"Value"`
Expand Down
1 change: 0 additions & 1 deletion internal/provider/file/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func (c *Client) listFileImage() []model.Image {
continue
}
for _, item := range items {

// Check NotifyOn
if len(item.NotifyOn) == 0 {
item.NotifyOn = model.NotifyOnDefaults
Expand Down