diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8d08993f..fed029fe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: - uses: golangci/golangci-lint-action@v2 with: - version: v1.43 + version: v1.44.2 mod-tidy: runs-on: ubuntu-20.04 diff --git a/.golangci.yml b/.golangci.yml index d57ffaab..6d0de664 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,6 @@ linters: enable: - - asciicheck - bodyclose - dupl - exportloopref @@ -12,13 +11,19 @@ linters: - misspell - lll - prealloc - - predeclared - revive - unconvert - - wastedassign - whitespace disable: - errcheck issues: exclude-use-default: false + +linters-settings: + govet: + enable-all: true + disable: + - fieldalignment + - reflectvaluecompare + - shadow diff --git a/Makefile b/Makefile index 726fff2d..094cda06 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BASE_IMAGE = golang:1.17-alpine3.14 -LINT_IMAGE = golangci/golangci-lint:v1.43 +LINT_IMAGE = golangci/golangci-lint:v1.44.2 NODE_IMAGE = node:14-alpine3.14 .PHONY: $(shell ls) diff --git a/internal/hls/muxer_ts_segment.go b/internal/hls/muxer_ts_segment.go index 9983ffc0..6234d391 100644 --- a/internal/hls/muxer_ts_segment.go +++ b/internal/hls/muxer_ts_segment.go @@ -75,9 +75,7 @@ func (t *muxerTSSegment) writeH264( var af *astits.PacketAdaptationField if idrPresent { - if af == nil { - af = &astits.PacketAdaptationField{} - } + af = &astits.PacketAdaptationField{} af.RandomAccessIndicator = true }