mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-17 20:24:38 +00:00
bump Golang to 1.23 (#3702)
This commit is contained in:
parent
d3b4a26413
commit
576a117c7c
6
.github/workflows/code_lint.yml
vendored
6
.github/workflows/code_lint.yml
vendored
@ -17,13 +17,13 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.23"
|
||||||
|
|
||||||
- run: go generate ./...
|
- run: go generate ./...
|
||||||
|
|
||||||
- uses: golangci/golangci-lint-action@v4
|
- uses: golangci/golangci-lint-action@v4
|
||||||
with:
|
with:
|
||||||
version: v1.55.0
|
version: v1.61.0
|
||||||
|
|
||||||
mod_tidy:
|
mod_tidy:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@ -33,7 +33,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.23"
|
||||||
|
|
||||||
- run: make lint-mod-tidy
|
- run: make lint-mod-tidy
|
||||||
|
|
||||||
|
2
.github/workflows/code_test.yml
vendored
2
.github/workflows/code_test.yml
vendored
@ -41,6 +41,6 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: "1.22"
|
go-version: "1.23"
|
||||||
|
|
||||||
- run: make test-highlevel-nodocker
|
- run: make test-highlevel-nodocker
|
||||||
|
8
Makefile
8
Makefile
@ -1,7 +1,7 @@
|
|||||||
BASE_IMAGE = golang:1.22-alpine3.19
|
BASE_IMAGE = golang:1.23-alpine3.20
|
||||||
LINT_IMAGE = golangci/golangci-lint:v1.59.1
|
LINT_IMAGE = golangci/golangci-lint:v1.61.0
|
||||||
NODE_IMAGE = node:20-alpine3.19
|
NODE_IMAGE = node:20-alpine3.20
|
||||||
ALPINE_IMAGE = alpine:3.19
|
ALPINE_IMAGE = alpine:3.20
|
||||||
RPI32_IMAGE = balenalib/raspberry-pi:bullseye-run-20240508
|
RPI32_IMAGE = balenalib/raspberry-pi:bullseye-run-20240508
|
||||||
RPI64_IMAGE = balenalib/raspberrypi3-64:bullseye-run-20240429
|
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
|
### 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
|
```sh
|
||||||
git clone https://github.com/bluenviron/mediamtx
|
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.
|
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
|
```sh
|
||||||
git clone https://github.com/bluenviron/mediamtx
|
git clone https://github.com/bluenviron/mediamtx
|
||||||
|
2
go.mod
2
go.mod
@ -1,6 +1,6 @@
|
|||||||
module github.com/bluenviron/mediamtx
|
module github.com/bluenviron/mediamtx
|
||||||
|
|
||||||
go 1.22
|
go 1.23
|
||||||
|
|
||||||
require (
|
require (
|
||||||
code.cloudfoundry.org/bytefmt v0.0.0
|
code.cloudfoundry.org/bytefmt v0.0.0
|
||||||
|
@ -19,17 +19,17 @@ func paginate2(itemsPtr interface{}, itemsPerPage int, page int) int {
|
|||||||
pageCount++
|
pageCount++
|
||||||
}
|
}
|
||||||
|
|
||||||
min := page * itemsPerPage
|
minVal := page * itemsPerPage
|
||||||
if min > itemsLen {
|
if minVal > itemsLen {
|
||||||
min = itemsLen
|
minVal = itemsLen
|
||||||
}
|
}
|
||||||
|
|
||||||
max := (page + 1) * itemsPerPage
|
maxVal := (page + 1) * itemsPerPage
|
||||||
if max > itemsLen {
|
if maxVal > itemsLen {
|
||||||
max = itemsLen
|
maxVal = itemsLen
|
||||||
}
|
}
|
||||||
|
|
||||||
ritems.Set(ritems.Slice(min, max))
|
ritems.Set(ritems.Slice(minVal, maxVal))
|
||||||
|
|
||||||
return pageCount
|
return pageCount
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ var optionalGlobalValuesType = func() reflect.Type {
|
|||||||
|
|
||||||
typ := f.Type
|
typ := f.Type
|
||||||
if typ.Kind() != reflect.Pointer {
|
if typ.Kind() != reflect.Pointer {
|
||||||
typ = reflect.PtrTo(typ)
|
typ = reflect.PointerTo(typ)
|
||||||
}
|
}
|
||||||
|
|
||||||
fields = append(fields, reflect.StructField{
|
fields = append(fields, reflect.StructField{
|
||||||
|
@ -25,7 +25,7 @@ var optionalPathValuesType = func() reflect.Type {
|
|||||||
|
|
||||||
typ := f.Type
|
typ := f.Type
|
||||||
if typ.Kind() != reflect.Pointer {
|
if typ.Kind() != reflect.Pointer {
|
||||||
typ = reflect.PtrTo(typ)
|
typ = reflect.PointerTo(typ)
|
||||||
}
|
}
|
||||||
|
|
||||||
fields = append(fields, reflect.StructField{
|
fields = append(fields, reflect.StructField{
|
||||||
|
@ -87,10 +87,10 @@ func writeTime(buf *bytes.Buffer, t time.Time, useColor bool) {
|
|||||||
intbuf.WriteByte(' ')
|
intbuf.WriteByte(' ')
|
||||||
|
|
||||||
// time
|
// time
|
||||||
hour, min, sec := t.Clock()
|
hour, minute, sec := t.Clock()
|
||||||
intbuf.Write(itoa(hour, 2))
|
intbuf.Write(itoa(hour, 2))
|
||||||
intbuf.WriteByte(':')
|
intbuf.WriteByte(':')
|
||||||
intbuf.Write(itoa(min, 2))
|
intbuf.Write(itoa(minute, 2))
|
||||||
intbuf.WriteByte(':')
|
intbuf.WriteByte(':')
|
||||||
intbuf.Write(itoa(sec, 2))
|
intbuf.Write(itoa(sec, 2))
|
||||||
intbuf.WriteByte(' ')
|
intbuf.WriteByte(' ')
|
||||||
|
@ -65,14 +65,14 @@ func randInt63n(n int64) (int64, error) {
|
|||||||
return r & (n - 1), nil
|
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()
|
v, err := randInt63()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for v > max {
|
for v > maxVal {
|
||||||
v, err = randInt63()
|
v, err = randInt63()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
|
Loading…
Reference in New Issue
Block a user