bump Golang to 1.23 (#3702)
This commit is contained in:
parent
d3b4a26413
commit
576a117c7c
|
@ -17,13 +17,13 @@ jobs:
|
|||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "1.22"
|
||||
go-version: "1.23"
|
||||
|
||||
- run: go generate ./...
|
||||
|
||||
- uses: golangci/golangci-lint-action@v4
|
||||
with:
|
||||
version: v1.55.0
|
||||
version: v1.61.0
|
||||
|
||||
mod_tidy:
|
||||
runs-on: ubuntu-22.04
|
||||
|
@ -33,7 +33,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "1.22"
|
||||
go-version: "1.23"
|
||||
|
||||
- run: make lint-mod-tidy
|
||||
|
||||
|
|
|
@ -41,6 +41,6 @@ jobs:
|
|||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "1.22"
|
||||
go-version: "1.23"
|
||||
|
||||
- run: make test-highlevel-nodocker
|
||||
|
|
8
Makefile
8
Makefile
|
@ -1,7 +1,7 @@
|
|||
BASE_IMAGE = golang:1.22-alpine3.19
|
||||
LINT_IMAGE = golangci/golangci-lint:v1.59.1
|
||||
NODE_IMAGE = node:20-alpine3.19
|
||||
ALPINE_IMAGE = alpine:3.19
|
||||
BASE_IMAGE = golang:1.23-alpine3.20
|
||||
LINT_IMAGE = golangci/golangci-lint:v1.61.0
|
||||
NODE_IMAGE = node:20-alpine3.20
|
||||
ALPINE_IMAGE = alpine:3.20
|
||||
RPI32_IMAGE = balenalib/raspberry-pi:bullseye-run-20240508
|
||||
RPI64_IMAGE = balenalib/raspberrypi3-64:bullseye-run-20240429
|
||||
|
||||
|
|
|
@ -2290,7 +2290,7 @@ Be aware that RTMPS is currently unsupported by all major players. However, you
|
|||
|
||||
### Standard
|
||||
|
||||
Install git and Go ≥ 1.22. Clone the repository, enter into the folder and start the building process:
|
||||
Install git and Go ≥ 1.23. Clone the repository, enter into the folder and start the building process:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/bluenviron/mediamtx
|
||||
|
@ -2331,7 +2331,7 @@ If you need to use a custom or external libcamera when interacting with the Rasp
|
|||
|
||||
Cross compilation allows to build an executable for a target machine from another machine with different operating system or architecture. This is useful in case the target machine doesn't have enough resources for compilation or if you don't want to install the compilation dependencies on it.
|
||||
|
||||
On the machine you want to use to compile, install git and Go ≥ 1.22. Clone the repository, enter into the folder and start the building process:
|
||||
On the machine you want to use to compile, install git and Go ≥ 1.23. Clone the repository, enter into the folder and start the building process:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/bluenviron/mediamtx
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
|||
module github.com/bluenviron/mediamtx
|
||||
|
||||
go 1.22
|
||||
go 1.23
|
||||
|
||||
require (
|
||||
code.cloudfoundry.org/bytefmt v0.0.0
|
||||
|
|
|
@ -19,17 +19,17 @@ func paginate2(itemsPtr interface{}, itemsPerPage int, page int) int {
|
|||
pageCount++
|
||||
}
|
||||
|
||||
min := page * itemsPerPage
|
||||
if min > itemsLen {
|
||||
min = itemsLen
|
||||
minVal := page * itemsPerPage
|
||||
if minVal > itemsLen {
|
||||
minVal = itemsLen
|
||||
}
|
||||
|
||||
max := (page + 1) * itemsPerPage
|
||||
if max > itemsLen {
|
||||
max = itemsLen
|
||||
maxVal := (page + 1) * itemsPerPage
|
||||
if maxVal > itemsLen {
|
||||
maxVal = itemsLen
|
||||
}
|
||||
|
||||
ritems.Set(ritems.Slice(min, max))
|
||||
ritems.Set(ritems.Slice(minVal, maxVal))
|
||||
|
||||
return pageCount
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ var optionalGlobalValuesType = func() reflect.Type {
|
|||
|
||||
typ := f.Type
|
||||
if typ.Kind() != reflect.Pointer {
|
||||
typ = reflect.PtrTo(typ)
|
||||
typ = reflect.PointerTo(typ)
|
||||
}
|
||||
|
||||
fields = append(fields, reflect.StructField{
|
||||
|
|
|
@ -25,7 +25,7 @@ var optionalPathValuesType = func() reflect.Type {
|
|||
|
||||
typ := f.Type
|
||||
if typ.Kind() != reflect.Pointer {
|
||||
typ = reflect.PtrTo(typ)
|
||||
typ = reflect.PointerTo(typ)
|
||||
}
|
||||
|
||||
fields = append(fields, reflect.StructField{
|
||||
|
|
|
@ -87,10 +87,10 @@ func writeTime(buf *bytes.Buffer, t time.Time, useColor bool) {
|
|||
intbuf.WriteByte(' ')
|
||||
|
||||
// time
|
||||
hour, min, sec := t.Clock()
|
||||
hour, minute, sec := t.Clock()
|
||||
intbuf.Write(itoa(hour, 2))
|
||||
intbuf.WriteByte(':')
|
||||
intbuf.Write(itoa(min, 2))
|
||||
intbuf.Write(itoa(minute, 2))
|
||||
intbuf.WriteByte(':')
|
||||
intbuf.Write(itoa(sec, 2))
|
||||
intbuf.WriteByte(' ')
|
||||
|
|
|
@ -65,14 +65,14 @@ func randInt63n(n int64) (int64, error) {
|
|||
return r & (n - 1), nil
|
||||
}
|
||||
|
||||
max := int64((1 << 63) - 1 - (1<<63)%uint64(n))
|
||||
maxVal := int64((1 << 63) - 1 - (1<<63)%uint64(n))
|
||||
|
||||
v, err := randInt63()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
for v > max {
|
||||
for v > maxVal {
|
||||
v, err = randInt63()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
|
Loading…
Reference in New Issue