Skip to content

Commit

Permalink
Use Go 1.21 as the lowest supported version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Apr 14, 2024
1 parent 9826294 commit ae2f828
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
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/Jacalz/rymdport/v3

go 1.19
go 1.21

require (
fyne.io/fyne/v2 v2.4.4
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ github.com/go-text/render v0.0.0-20230619120952-35bccb6164b8/go.mod h1:h29xCucjN
github.com/go-text/typesetting v0.1.0 h1:vioSaLPYcHwPEPLT7gsjCGDCoYSbljxoHJzMnKwVvHw=
github.com/go-text/typesetting v0.1.0/go.mod h1:d22AnmeKq/on0HNv73UFriMKc4Ez6EqZAofLhAzpSzI=
github.com/go-text/typesetting-utils v0.0.0-20231211103740-d9332ae51f04 h1:zBx+p/W2aQYtNuyZNcTfinWvXBQwYtDfme051PR/lAY=
github.com/go-text/typesetting-utils v0.0.0-20231211103740-d9332ae51f04/go.mod h1:DDxDdQEnB70R8owOx3LVpEFvpMK9eeH1o2r0yZhFI9o=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
Expand Down Expand Up @@ -171,6 +172,7 @@ github.com/gopherjs/gopherjs v0.0.0-20211219123610-ec9572f70e60/go.mod h1:cz9oNY
github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/goxjs/gl v0.0.0-20210104184919-e3fafc6f8f2a/go.mod h1:dy/f2gjY09hwVfIyATps4G2ai7/hLwLkc5TrPqONuXY=
github.com/goxjs/glfw v0.0.0-20191126052801-d2efb5f20838/go.mod h1:oS8P8gVOT4ywTcjV6wZlOU4GuVFQ8F5328KY3MJ79CY=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
Expand Down
9 changes: 3 additions & 6 deletions internal/transport/bridge/recv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bridge

import (
"path/filepath"
"slices"

Check failure on line 5 in internal/transport/bridge/recv.go

View workflow job for this annotation

GitHub Actions / tests (1.19.x)

package slices is not in GOROOT (/home/runner/work/rymdport/setup-go-faster/go/1.19.13/x64/src/slices)
"sync/atomic"
"time"

Expand Down Expand Up @@ -191,12 +192,8 @@ func (d *RecvData) remove(index int) {
// Make sure that no updates happen while we modify the slice.
d.deleting.Store(true)

if index < len(d.items)-1 {
copy(d.items[index:], d.items[index+1:])
}

d.items[len(d.items)-1] = nil // Allow the GC to reclaim memory.
d.items = d.items[:len(d.items)-1]
d.items[index] = nil // TODO: Remove once we have Go 1.22 as the base.
d.items = slices.Delete(d.items, index, index+1)

// Update the moved items to have the correct index.
for j := index; j < len(d.items); j++ {
Expand Down
9 changes: 3 additions & 6 deletions internal/transport/bridge/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package bridge

import (
"path/filepath"
"slices"
"sync/atomic"

"fyne.io/fyne/v2"
Expand Down Expand Up @@ -340,12 +341,8 @@ func (d *SendData) remove(index int) {
// Make sure that no updates happen while we modify the slice.
d.deleting.Store(true)

if index < len(d.items)-1 {
copy(d.items[index:], d.items[index+1:])
}

d.items[len(d.items)-1] = nil // Allow the GC to reclaim memory.
d.items = d.items[:len(d.items)-1]
d.items[index] = nil // TODO: Remove once we have Go 1.22 as the base.
d.items = slices.Delete(d.items, index, index+1)

// Update the moved items to have the correct index.
for j := index; j < len(d.items); j++ {
Expand Down

0 comments on commit ae2f828

Please sign in to comment.