Skip to content

Commit

Permalink
Update Golang to v1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Sep 25, 2024
1 parent c9ed0e1 commit 06cb9bb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 27 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,19 @@ jobs:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}

strategy:
matrix:
go-version: [1.21.x]

runs-on: ubuntu-latest-4-cores

steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20.11'
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Execute Tests
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@ permissions:
jobs:
golangci:
name: lint
strategy:
matrix:
go-version: [1.21.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2

# Optional: if set to true then the action will use pre-installed Go.
skip-go-installation: true
version: v1.60.0
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ linters:
- ineffassign # Detects when assignments to existing variables are not used
- unconvert # Removes unnecessary type conversions
- unused # Checks Go code for unused constants, variables, functions and types
- exportloopref # Checks for pointers to enclosing loop variables
- copyloopvar # Checks for pointers to enclosing loop variables
- errcheck # Detects unchecked errors
- misspell # Finds commonly misspelled English words
- goimports # Check import statements are formatted according to the 'goimports' command
Expand Down
8 changes: 4 additions & 4 deletions client/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ func (th *TestHelper) screenTrackWriter(track *webrtc.TrackLocalStaticRTP, close
// Open a IVF file and start reading using our IVFReader
file, ivfErr := os.Open(filename)
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}
defer file.Close()

ivf, header, ivfErr := ivfreader.NewWith(file)
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}

// Send our video file frame at a time. Pace our sending so we send it at the same speed it should be played back as.
Expand Down Expand Up @@ -125,14 +125,14 @@ func (th *TestHelper) screenTrackWriter(track *webrtc.TrackLocalStaticRTP, close
_, _ = file.Seek(0, 0)
ivf, header, ivfErr = ivfreader.NewWith(file)
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}
return file
})
frame, _, ivfErr = ivf.ParseNextFrame()
}
if ivfErr != nil {
log.Fatalf(ivfErr.Error())
log.Fatal(ivfErr.Error())
}

packets := packetizer.Packetize(frame, 90000/header.TimebaseDenominator)
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/mattermost/rtcd

go 1.21.9
go 1.22.7

require (
git.mills.io/prologic/bitcask v1.0.2
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ github.com/pion/transport/v2 v2.2.2/go.mod h1:OJg3ojoBJopjEeECq2yJdXH9YVrUJ1uQ++
github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/transport/v2 v2.2.4 h1:41JJK6DZQYSeVLxILA2+F4ZkKb4Xd/tFJZRFZQ9QAlo=
github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/transport/v2 v2.2.5 h1:iyi25i/21gQck4hfRhomF6SktmUQjRsRW4WJdhfc3Kc=
github.com/pion/transport/v2 v2.2.5/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0=
github.com/pion/transport/v3 v3.0.2 h1:r+40RJR25S9w3jbA6/5uEPTzcdn7ncyU44RWCbHkLg4=
github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37m0IlWa/D0=
Expand Down

0 comments on commit 06cb9bb

Please sign in to comment.