Skip to content

Commit

Permalink
Upgrade linter - fix found issues - use go1.20 (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak authored Jul 18, 2023
1 parent 1318ad6 commit e2359a8
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
Expand Down Expand Up @@ -29,11 +29,11 @@ $(BINGO): $(BINGO_DIR)/bingo.mod
@echo "(re)installing $(GOBIN)/bingo-v0.5.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.5.1 "github.com/bwplotka/bingo"

GOLANGCI_LINT := ${GOBIN}/golangci-lint-v1.50.1
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.53.3
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.50.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOLANGCI_LINT) "github.com/golangci/golangci-lint/cmd/golangci-lint"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.53.3"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.53.3 "github.com/golangci/golangci-lint/cmd/golangci-lint"

JB := $(GOBIN)/jb-v0.4.0
$(JB): $(BINGO_DIR)/jb.mod
Expand Down
2 changes: 1 addition & 1 deletion .bingo/golangci-lint.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.16

require github.com/golangci/golangci-lint v1.50.1 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.53.3 // cmd/golangci-lint
4 changes: 2 additions & 2 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
Expand All @@ -12,7 +12,7 @@ BENCHSTAT="${GOBIN}/benchstat-v0.0.0-20211012211434-03971e389cd3"

BINGO="${GOBIN}/bingo-v0.5.1"

GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.50.1"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.53.3"

JB="${GOBIN}/jb-v0.4.0"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']

steps:
- name: install make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']

steps:
- name: install make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']
steps:
- name: install make
run: sudo apt-get install make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_image_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']
steps:
- name: install make
run: sudo apt-get install make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.19']
go: ['1.20']
steps:
- name: checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ OCI_BUILD_OPTS ?=
OCI_BIN_PATH = $(shell which docker 2>/dev/null || which podman)
OCI_BIN ?= $(shell basename ${OCI_BIN_PATH})

MIN_GO_VERSION := 1.18.0
MIN_GO_VERSION := 1.19.0
FLP_BIN_FILE=flowlogs-pipeline
CG_BIN_FILE=confgenerator
NETFLOW_GENERATOR=nflow-generator
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ Usage:
flowlogs-pipeline [flags]

Flags:
--config string config file (default is $HOME/.flowlogs-pipeline)
--health.port string Health server port (default "8080")
-h, --help help for flowlogs-pipeline
--log-level string Log level: debug, info, warning, error (default "error")
--metrics-settings string json for global metrics settings
--parameters string json of config file parameters field
--pipeline string json of config file pipeline field
--profile.port int Go pprof tool port (default: disabled)
--config string config file (default is $HOME/.flowlogs-pipeline)
--health.address string Health server address (default "0.0.0.0")
--health.port string Health server port (default "8080")
-h, --help help for flowlogs-pipeline
--log-level string Log level: debug, info, warning, error (default "error")
--metricsSettings string json for global metrics settings
--parameters string json of config file parameters field
--pipeline string json of config file pipeline field
--profile.port int Go pprof tool port (default: disabled)
```
<!---END-AUTO-flowlogs-pipeline_help--->

Expand Down Expand Up @@ -94,7 +95,7 @@ These instructions apply for deploying FLP development and exploration environme
tested on Ubuntu 20.4 and Fedora 34.
1. Make sure the following commands are installed and can be run from the current shell:
- make
- go (version 1.18)
- go (version 1.19)
- docker
2. To deploy the full simulated environment which includes a kind cluster with FLP, Prometheus, Grafana, and
netflow-simulator, run (note that depending on your user permissions, you may have to run this command under sudo):
Expand Down
2 changes: 1 addition & 1 deletion contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# We do not use --platform feature to auto fill this ARG because of incompatibility between podman and docker
ARG TARGETPLATFORM=linux/amd64
ARG BUILDPLATFORM=linux/amd64
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.19 as builder
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.20 as builder

ARG TARGETPLATFORM
ARG TARGETARCH=amd64
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/netobserv/flowlogs-pipeline

go 1.18
go 1.19

require (
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible
Expand Down
1 change: 0 additions & 1 deletion pkg/pipeline/transform/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ type kubeDataInterface interface {
}

type KubeData struct {
kubeDataInterface
// pods, nodes and services cache the different object types as *Info pointers
pods cache.SharedIndexInformer
nodes cache.SharedIndexInformer
Expand Down

0 comments on commit e2359a8

Please sign in to comment.