mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-21 13:23:09 +01:00
Go 1.18 (#592)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
41
.golangci.yml
Normal file
41
.golangci.yml
Normal file
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
variable "GO_VERSION" {
|
||||
default = "1.17"
|
||||
default = "1.18"
|
||||
}
|
||||
|
||||
// GITHUB_REF is the actual ref that triggers the workflow
|
||||
|
||||
2
go.mod
2
go.mod
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ./...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user